❔ TCP Server receives messages only after closing connection
I use the TCP protocol to send a message to the server once in a certain time interval. However, the server displays all these messages at once, and only after the client program closes. How can I make the server receive messages as the client proceeds, and not after the connection ends? Tried NetworkStream but the problem persisted.
4 Replies
$paste
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
Been a very, very long time since I did socket programming, but are you flushing?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.