Threads, sockets and windows



Hello,

I'm trying to write two-threaded program: one thread for GUI and the other
for network. The network thread needs to poll network socket and to receive
messages from the GUI thread (such as commands to send something to network
or to disconnect). I've used pipe for commands, so in the network thread I
can simply poll() network socket and pipe together.

But on windows there is no poll() function. Of course I can use
g_async_queue, but doing so I can't poll queue and network socket
simultaneously.

Are there any method to poll g_async_queue and network socket or pipe and
network socket on windows simultaneously ? Or may be, is there something in
the GTK/Glib for this kind of situations ?

-- 
             Vladimir




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]