[freetds] connect(2) for UDP

Jackson, Craig (Gale) Craig.Jackson at cengage.com
Thu Dec 18 10:05:05 EST 2008


> > 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


More information about the FreeTDS mailing list