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