56
Netprog 2002
TCP/IP
Netprog 2002
TCP/IP
Reading from a TCP socket
•
By default
read()
will block until data is
available.
•
Reading from a TCP socket may return
less than max bytes (whatever is
available).
•
You must be prepared to read data 1
byte at a time!