#๐Ÿ”’ Python socket API recvfrom stuck

5 messages ยท Page 1 of 1 (latest)

halcyon quail
#

Hi, I have a client server architecture script in python, with the server performing conn.sendall(str(i).encode()) about every minute with conn being the accepted connection and I being a standard integer.
The client receives this with i_socket.recvfrom(4), i_socket being the socket. Not sure if this enough context but for some reason the receive line on client hangs about every 5-10 minutes worth of packets and gets stuck there, I have a line below for sending a packet back to the server that the server doesn't receive so I know the client gets stuck there and doesn't receive the servers packet.
Anyone know what could cause this?

sterile belfryBOT
#

@halcyon quail

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.

spice knoll
#

Provide full code of both client and server for context

sterile belfryBOT
#
Python help channel closed for inactivity

This help channel has been closed. 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.