comments inline On Fri, Jan 14, 2011 at 7:05 PM, Adrien BARREAU <abarreau.dev@live.fr>wrote:
Hello,
I read these documents: http://book.pharo-project.org/book/networking/Socket http://wiki.squeak.org/squeak/325
but I still don't get what I want with pharo.
Here is the idea: I want a socket to listen a port while pharo is launched as a deamon.
I tried to test the sockets with this idea: - creation of two sockets in two workspaces - server:
| server st | st := String new. server := Socket newTCP. server listenOn: 12345 backlogSize: 4. server receiveDataInto: st
- client:
| s | s connectTo: ('127.0.0.1' asByteArray asSocketAddress) port: 12345.
Shouldn't this lead to a MNU? I don't know how to initialize a socket, but maybe you forget to instantiate the socket, or you have to talk to the class.
s sendData: 'Hello'
- the connectTo:port: fails, and I don't understand why
So I have no idea ...
Adrien.
Cheers,