Hello,

I would like to send datagrams thru SendTo() instead of
Send() in order to bypass copying data to TWSocket's send
buffer. When I call SendTo() I have to handle
possible errors by myself, but I do not understand
exactely whether it's possible that the function returns
a positive result smaller than Len.

The online help says:

"If no error occurs, sendto returns the total number of bytes
sent, which can be less than the number indicated by len."

OK, but a little bit later:

"For message-oriented sockets, care must be taken not to exceed
the maximum packet size of the underlying subnets, which can
be obtained by using getsockopt to retrieve the value of
socket option SO_MAX_MSG_SIZE. If the data is too long to pass
atomically through the underlying protocol, the error
WSAEMSGSIZE is returned and no data is transmitted."

Does this mean that in UDP either any number of bytes is sent
or WSAEMSGSIZE is returned?


---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
  

  
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to