about sockets recv() method.

O

OxO pHz.60

Hi, i'm programming a mud client in ruby and in order to recive all
the input i did this.

Gtk.idle_add { data =3D angalon.recv( 8 )
data =3D angalon.preprocess( data )
buffer.insert( buffer.end_iter , data )
}

but after the first lines are read and printed to the screen the
program becames unresponsive.

i've tested adding=20
last_time =3D 0
Gtk.idle_add { puts "Idle" + last_time + "\n"=20
last_time =3D last_time + 1}

and the program doesn't became unresponsive after it. (ie it responds
to me clicking the exit buttong and sending messages to the buffer.)

so i'm thinking recv() is waiting for something? i thought it was
different than wait for but since the method is implemented in C i
don't know where to read the implementation, can someone tell me how
exactly recv() works or refer me to the C file the is implemented?
(although i would prefer the first option).

Thanks in advance
--=20
Rorschach el Pirata
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top