Hello, This UDP stuff is driving me nuts. Maximum outbound (send) size of a message returned by getsockopt as described below is 65507 bytes on my w2k box. Up to this size datagrams go over the wire. However if I SendTo a bigger datagram up to 65527 bytes then SendTo happily returns success even though nothing was sent! At a datagram size of 65528 bytes however the function fails with WSAGetLastError returning WSAEMSGSIZE as stated in the M$ documentation, is this normal?
Also, when I set the IP_DONTFRAGMENT flag before sending a datagram that would have being fragmented otherwise SendTo also happily returns success even though no data was sent. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Arno Garrels wrote: > 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
