On Mon, Nov 27, 2006 at 12:58:33PM -0600, William Rowe wrote: > If our understanding is correct, isn't the following patch needed to address > the missing win32 and unix unknown_local_address for bind, and os2 missing > both this and unknown_local_port, and for win32/os2 set up the unknown_remote > initial value?
I don't think it's correct to do the compare-against-anyaddr in _bind(). If the socket is bound to 0.0.0.0 then the local address of the socket *is* known to be 0.0.0.0. There is no need to call getsockname() to confirm that later, it can't change until _connect() is called, at which point the existing code does already DTRT by setting the "unknown" flag iff necessary. Other than that, the non-Unix changes look fine (I always forget that all this code is just copy'n'pasted in N places :() Regards, joe
