Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Problem with socket.recv
Roger Pack
10/30/2007 5:10:00 PM
Make sure you flush on the sending side, as it might not send it all
immediately (uses the nagle algorithm).
Frank Preiswerk wrote:
> Hi everyone,
>
> I'm currently developing a Ruby TCP client and have a problem with
> socket.recv().
> After establishing a connection with my server, I exchange a couple of
> messages until the server begins to do some calculations based on the
> client's request that take about 10 seconds. After the server finishes,
> it
> sends back the result. Now my problem is that "data = socket.recv(size)"
> seems to behave non-blocking for some reason. It does not wait for the
> 10
> seconds but rather executes immediately and "data" remains empty. When I
> add
> "sleep(10)" before, it works...
>
> Any hints would be great.
>
> Thanks in advance,
> Frank
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Problem with socket.recv
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password