From: Robert Klemme Date: 2008-10-17T18:29:35+09:00 Subject: Re: socket recv or gets? On 17.10.2008 09:40, Jamal Soueidan wrote: > Hello there, > > I wonder whats the difference between these methods ( gets and recv ) > > loop { > data = current_client.recv(100) > puts data > } > > When I use "gets" instead of recv my socket connection stops and never > print out the message? > > Why? :D See documentation. #gets tries to read a line (i.e. until it sees a line terminator). Also, I believe recv also works with UDP while I am not sure about gets. Cheers robert