AJ ONeal
unread,Jan 18, 2011, 11:07:30 PM1/18/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to uta...@googlegroups.com
According to the man page of recv, it looks like this should work:
length = recv(socket_fd, NULL, 0, MSG_TRUNC);
However, it always returns -1.
char c;
length = recv(socket_fd, &c, 1, MSG_TRUNC | MSG_PEEK);
Always returns 1
How can I tell how many bytes I will be receiving before I receive them?
AJ ONeal