From: Yohanes Santoso Date: 2002-05-04T04:52:10+09:00 Subject: Re: Sockets problem "Kontra, Gergely" writes: > Azt irtad, hogy > > >Matthew PATTISON wrote: > >[...] > >> e.g. Ruby seems to wait a long time before gets() returns, even when there's > >> stuff waiting on the socket. I've tried setting $/ = "\r\f" but that didn't > >> work - my script just hung. Any ideas? Is $/ the right variable to > >> set so that socket.gets will look for a different line separator? > > > >Hm, AFAIK Windows uses \r\n. Maybe that will work as $/ > > What if I don't know, that connections are from mac, unix or windows? I think that's why many protocols specify "\r\n" as the line ending combo. YS.