I wish i could say this can work in JacobsLadder, but it didn't work for
me a few days back. Perhaps somebody else can get it to be make to work.
I am sure it is possible and probable. There is much potential, thank God.
best,
robert
On 12/17/2015 12:53 PM, Hernán Morales Durand wrote:
Hi Denis,
There is
http://www.squeaksource.com/SocketExamples.html
http://www.squeaksource.com/Net.html
Last one seems a lot of interesting work.
or look for #remoteTestServerTCP which was in OldSocket or Socket some
time ago:
remoteTestServerTCP
"See remoteTestClientTCP for instructions on running this method."
"OldSocket remoteTestServerTCP"
| socket client buffer n |
Transcript show: 'initializing network ... '.
Socket initializeNetwork.
Transcript show:'ok';cr.
socket _ OldSocket newTCP.
socket
listenOn: 54321
backlogSize: 5
interface: (NetNameResolver addressFromString: '127.0.0.1').
"or: 0.0.0.0"
Transcript show: 'server endpoint created -- run client test in
other image'; cr.
buffer _ String new: 4000.
socket waitForConnectionUntil: self standardDeadline.
client _ socket accept.
[client isConnected] whileTrue: [
client dataAvailable ifTrue:
[n _ client receiveDataInto: buffer.
client sendData: buffer count: n]].
client closeAndDestroy.
socket closeAndDestroy.
Transcript cr; show: 'server endpoint destroyed'; cr.
^socket
Cheers,
Hernán
2015-12-10 8:07 GMT-03:00 Denis Kudriashov <[email protected]
<mailto:[email protected]>>:
Hi.
I need simple TCP server which process incoming connection in
separate processes.
I see Zinc ZnServer subclasses implement something like that. But
I'm not sure that it is good idea to reuse it. Zinc server has http
related methods which I'm not need.
What you think?
(I don't want to implement another one incoming connections loop)
--
. .. .. ^,^ best, robert