On 06/18/2010 05:34 PM, Paolo Bonzini wrote:

>> Sorry, of course we need to pass the port as a number... the point is
>> more that binding to googles public ip on my system should fail and it
>> didn't.
> 
> Why?  You just won't get any datagram, AFAIU.

Sure, you will not get any datagram and the read should fail pretty fast.

st> Sockets.DatagramSocket local: '8.8.8.8' port: 23000
Sockets.DatagramSocket[0.0.0.0:0]

generates the following syscalls:

bind(3, {sa_family=AF_INET, sin_port=htons(23000),
sin_addr=inet_addr("8.8.8.8")}, 16) = -1 EADDRNOTAVAIL (Cannot assign
requested address)
rt_sigprocmask(SIG_BLOCK, ~[QUIT ILL ABRT BUS SEGV RTMIN RT_1], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
rt_sigprocmask(SIG_BLOCK, ~[QUIT ILL ABRT BUS SEGV RTMIN RT_1], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("0.0.0.0")}, [16]) = 0

and I think the failure of the bind should be propagated as an
exception, it does not as the SOL_ERROR is not reporting any error (okay
I didn't verify that).





_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to