send() and recv() - Let's talk!
● int recv(int sockfd, void *buf, int len, int flags);– sockfd is the socket descriptor to read from
– buf is the buffer to read the information into
– len is the maximum length of the buffer
– set flags to 0 for now
– recv() returns the number of bytes actually read into
the buffer or -1 on error
– If recv() returns 0, the remote side has closed
connection on you
No comments:
Post a Comment