 |
| View previous topic :: View next topic |
| Author |
Message |
nomexous
Joined: 25 Apr 2007 Posts: 1
|
Posted: Wed Apr 25, 2007 11:14 pm Post subject: Function socket_read() delay |
|
|
I'm trying to create an AIM client using the BlueTOC classes and PHP-GTK. So far I can sign in, but that's all. After signing in, the window freezes. I looked around, and came across the solutions involving Gtk::idle_add(), Gtk::timeout_add(), Gtk::events_pending(), and Gtk::main_iteration(). But the program still refuses to respond after I log in.
I know that the program works; it can automatically respond to messages. But the UI isn't being updated at all. I puzzled over it and did a bit of investigating in the code. It turns out that the infinite loop function used to listen for events (eg. incoming IMs) has a socket_read() in it that takes forever (actually about 50 seconds) to read. During that time, none of the commands to update the UI are run.
I've tried setting a timeout for the socket_read(), but either I'm doing it wrong, or it just doesn't work. Can anyone help me? |
|
| Back to top |
|
 |
clange
Joined: 24 Jan 2006 Posts: 11
|
Posted: Mon Jul 09, 2007 11:15 am Post subject: |
|
|
Hi,
can you post your code?
i think the socket_* are not compatible with gtk, use the stream function to create/listen on a socket like stream_socket_server or stream_socket_client.
mfg clange |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
 |