[plt-scheme] udp-connected?

From: Richard Cleis (rcleis at mac.com)
Date: Mon May 17 20:31:20 EDT 2010

I had been using embedded 209 for years, and would check the  
'connection' to the remote computer by attempting to send to it.   
After upgrading to 4.2 recently, I ended up using with-handlers (in  
Scheme source) to catch 'no route to host'; that wasn't required in my  
209 implementation.  I don't have an old enough copy of my source with  
me to see how it worked, though.  The connection? question was fishing  
for a way to do it without causing an exception at all.

RAC

On May 17, 2010, at 12:31 PM, Thomas Chust <chust at web.de> wrote:

> 2010/5/18 Richard Cleis <rcleis at mac.com>:
>> If udp-connect is attemped (to a remote computer) when the network  
>> is not
>> 'plugged in', udp-connected? returns true anyway.  Is that the  
>> intended
>> behavior?
>> [...]
>
> Hello,
>
> UDP is a connectionless protocol and using udp-connect is a purely
> local operation that does nothing more than set a default target for
> packets sent through the socket. Consequently udp-connected? only
> queries the socket whether it has such a default target set up or not.
>
> Ciao,
> Thomas
>
>
> -- 
> When C++ is your hammer, every problem looks like your thumb.


Posted on the users mailing list.