#๐ Help sockets chat protocol between two clients each connecting with a daemon(daemon handles client
28 messages ยท Page 1 of 1 (latest)
@full dove
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.
How to change lol
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.
or like this ?
If anybody wants terminal output i can give it
What i need to implement:
- 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). - 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. - The user will always have the option to quit (disconnect from the daemon) by pressing the key
"q".
Looks like your server is communicating with UDP but you client is trying to use TCP
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
I cant provide that unfortunately
So there is not really an issue but an extra implementation i want to put
which i tried for the last 5 hours with no success
You'll need to post your requirements or we can't help you
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
What are the requirements regarding protocol?
You're not doing any framing on your TCP connections, you should be
That i need to use UDP between daemons and TCP between client daemon
You should send a message length then the message
Or delimit your message with newlines and escape the newlines eg json-lines
So thats improvement ? right ?
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.