Re: connect(2) for UDP

"Jackson, Craig (Gale)" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
> > Recommend using bind() rather than connect() with UDP.  With bind you
> > still get ICMP indiciations for fast failure when send()ing.
> 
> More specifically..
> 
> bind()
> sendto()
> select() for response
> 
> The select will wake on either the expiration of the timer, data to be 
> read or a failure hint if it turns out nothing was listening on the port 
> from the previous sendto()

That sounds like a good plan.  Bind() fixes the source address, which is all
that connect() really buys you.

Craig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.