On 3 ϦԦ 2013, at 21:24 , Joel VanderWerf <joelvanderwerf / gmail.com> wrote:

> On 06/03/2013 11:47 AM, Panagiotis Atmatzidis wrote:
>> Hello,
>> 
>> I'm writing a client/server application using TCPSocket and TCPServer. To serialize the objects at this point I use Marshal, since it comes handy.
> ...
>> What I notice is that connection ends when the '\n' character appears. I think that the issue is me using "@con.gets" method instead of something more appropriate. I tried @con.read but since 'read' method waits for the remote party to send an 'EOF' or close the connection stalls.
>> 
>> Is there any other method I can use instead of gets? I did a 'methods.sort' but I can't see and I don't know how to read about these methods using "ri". 'ri TCPSocket::getc' for example doesn't work.
> 
> You can try
> 
> Marshal.load(conn)
> 
> on the client side. The Marshal#load method determines just how many bytes to read.


Worked fine! Thank you! I don't get it thought, could you elaborate a bit?

Thanks again!


Panagiotis (atmosx) Atmatzidis

email:	atma / convalesco.org
URL:	http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5
--
The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."