This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: sendto bug
- From: David E Euresti <davie at MIT dot EDU>
- To: <cygwin at cygwin dot com>
- Date: Fri, 29 Mar 2002 15:36:23 -0500 (EST)
- Subject: Re: sendto bug
Actually the Single UNIX Specification says:
If the socket is connectionless-mode, the message will be sent to
the address specified by dest_addr. If the socket is
connection-mode, dest_addr is ignored.
And since sendto calls either WSASendTo or winsock 1 sendTo that state:
Even if the connectionless socket has been previously connected
using the connect function to a specific address, lpTo overrides
the destination address for that particular datagram only. On a
connection-oriented socket, the lpTo and iToLen parameters are
ignored; in this case, the WSASendTo is equivalent to WSASend.
Therefore there should be no harm in passing in the NULL value to sendto.
David
Quoting cgf:
I don't see anything in the linux man page or the Single UNIX
Specification which indicates that the "to" address can be NULL.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/