Hi Todd, The socket chapter in writing progress could help you: https://gforge.inria.fr/scm/viewvc.php/*checkout*/PharoByExampleTwo-Eng/Sock... I do not remember if the receiveData method is blocking. If not, you should wait til data arrives. Cheers, Jannik On Feb 6, 2012, at 22:22 , Eagle Offshore wrote:
I'm trying to build a display for some instruments that multicast readings using UDP. I started out using CocoaAsyncSocket on Mac (https://github.com/robbiehanson/CocoaAsyncSocket) and I have to say it has a really wonderful api - would be worth cloning it.
However, want to do the same thing in Pharo so I have typed this little snippet into the workspace:
[| socket | socket := Socket newUDP. 10 timesRepeat: [| s | s := String new. socket receiveDataInto: s fromHost: (NetNameResolver addressFromString:'255.255.255.255' ) port: 4848. Transcript show: s.]] fork
and it doesn't seem to do anything.
What have I missed? Pharo 1.3 stable on SnowLeopard BTW.
Thanks, -Todd Blanchard
--- Jannik Laval