Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

I was only able to send and receive if I sent or received 1024 bytes at a time. I couldn't make it work with any less.

asked in CSC335_Spring2019 by (1 point)

1 Answer

+3 votes

Hmm... sounds like it is only sending after it has filled up a buffer. Any chance you are using a buffered stream reader/writer of some sort? If so, look for a flush operation you can call.

(Or maybe the buffering is happening at the TCP level, underneath your Java or Python code. Not sure. It's been a while since I've done any network programming...)

answered by (3.2k points)
...