As far as I understood the documentation, the following should send 'aaa' and
receive 'Hello world!'?
MaServerSocket new listenOn: 12345 answer: [ :requestByteArray | 'Hello world!' ]. mySocket _ MaClientSocket hostAddress: #(127 0 0 1) port: 12345. mySocket sendData: #(65 65 65)
Regards, Markus
Oops.. Honestly, I haven't tried it with Strings, but it seems like it *should* work. Just in case, I've changed the documentation to convert that 'Hello World' to a ByteArray (#asByteArray) until I can test that.
The other thing is.. I haven't actually tried to connect to a Socket listening in the *same* image, only different images. It may work, I just don't know for sure.
I hope this answers your question! Did you find an issue?
I think also included a couple of additional files in the SAR, clientTest.ws and serverTest.ws. The client sends a byteArray, the server reverses it and sends it back, which the client then verifies.
Regards, Chris
__________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
On Mon, 3 Feb 2003, Chris Muller wrote:
The other thing is.. I haven't actually tried to connect to a Socket listening in the *same* image, only different images. It may work, I just don't know for sure.
Would you have to fork the listen call to make sure it goes on to the next line?
Regards, Aaron
Aaron Reichow :: UMD ACM Pres :: http://www.d.umn.edu/~reic0024/ "truth is beautiful, without doubt; but so are lies." :: r. w. emerson
squeak-dev@lists.squeakfoundation.org