#๐Ÿ”’ Help sockets chat protocol between two clients each connecting with a daemon(daemon handles client

28 messages ยท Page 1 of 1 (latest)

hexed vigilBOT
#

@full dove

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

full dove
#

How to change lol

gleaming orbit
#

You can paste code here

#

!paste

hexed vigilBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

full dove
#

or like this ?

#

If anybody wants terminal output i can give it

#

What i need to implement:

  1. The daemon responds that a conversation request is pending. In this case, the client will show
    the IP address and the username of the user requesting the chat and will ask the user to decide
    whether to accept or decline the chat request (IP address and username of the remote user will
    be provided by the daemon to the client).
  2. If there is no chat request pending, the user will be asked if they want to start a new chat or wait
    for chat requests. In the first case, the client will request the IP address of the user to send the
    chat request to. In the latter case, the client will enter an idle state where it waits for incoming
    chat requests. As soon as a chat request arrives, the client will proceed as in case 1.
  3. The user will always have the option to quit (disconnect from the daemon) by pressing the key
    "q".
novel wolf
#

Looks like your server is communicating with UDP but you client is trying to use TCP

full dove
#

Thats what i want to do

#

its in the requirements, between the daemons i need to use UDP but for daemon client i will use TCP

#

the daemon takes its client actions

novel wolf
#

Post your full list of requirements?

#

Also what is the issue you're having?

full dove
full dove
#

which i tried for the last 5 hours with no success

novel wolf
#

You'll need to post your requirements or we can't help you

full dove
#

Okay then:
When a client wants to start a chat with another client, it inputs the IP, that will be processed by the daemon which will connect to the targets IP daemon first.
The other client will get this request from its personal daemon and will get the choice of either accepting the chat request or declining the chat request.
This are mainly the requirements if thats what you asking for. I am sorry if i dont provide what needed, Its my first time asking for help on forums

novel wolf
#

What are the requirements regarding protocol?

#

You're not doing any framing on your TCP connections, you should be

full dove
#

That i need to use UDP between daemons and TCP between client daemon

novel wolf
#

You should send a message length then the message

#

Or delimit your message with newlines and escape the newlines eg json-lines

full dove
#

So thats improvement ? right ?

hexed vigilBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.