question about UDP socket

Jan B. Krejčí JanBKrejci at gmail.com
Wed Oct 13 12:19:52 UTC 2004


> To be honest - not :) It seems this is  almost impassable terrain. I've
> built  3.7b-5 vm and still I can't run Ned's example.
> Maybe someone else try it in unix vm?

Few days ago I sent something similar, but the e-mail has lost
somewhere and never reached this mailing list. I've described similar
problems running under Windows

The code you wrote in first e-mail:

dst _ Socket newUDP setPort: 55555.
src _ Socket newUDP.
src sendUDPData: 'a test' toHost:  (NetNameResolver localHostAddress)
port:  dst port.
 " *primitive failed* here "
src closeAndDestroy.
buff _ String new: 16384
dst receiveUDPDataInto: buff.
buff inspect.
dst closeAndDestroy.

works in my case (linux, 3.6 VM, 3.7 image) perfectly, I just had to
change the buffer into String, because when I was using Array, I got
primitive failed at the line:

dst receiveUDPDataInto...

The problem under windows I've encountered is slightly different. My
Squeak thinks it has received full buffer (the array returned from
receiveUDPData has first item equal to size of the buffer, then it
contains some impossible IP address starting with zero) but actually
it receives nothing at all. Strange, eh?

-- 
.:jbk:.
Jan B. Krejci



More information about the Squeak-dev mailing list