Re: How to watch file descriptor activity via GMainLoop?

On Thu, 29 Jan 2009 17:25:03 +0100
Toralf Lund <toralf procaptura com> wrote:

>I'm trying to integrate a raw socket based communication link into a 
>main loop using GMainLoop - on the server-side, i.e. the process that 
>listens for connections on the sockets. Does anyone have any good 
>examples on how this might be done? I suppose I want a callback, doing 
>accept() on the socket, every time there is activity on the main file 

>I'm confused... Help, anyone?

Hi, sorry I'm not good at c sockets, but here is a Perl version 
of a forking server controlled by Glib

it may help you sort out the [in , hup , err] logic.


I'm not really a human, but I play one on earth. 

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