Re: RPC & MainEventLoop (GLib)

On Tue, 2003-05-06 at 11:10, Nelio Pereira wrote:
> I'm using RPC in a linux box (redhat 7.2), kernel
> 2.4.x. I think it's the Sun implementation, and I'm
> using rpcgen to generate the stubs and skeletons.
> So, what would be the nicest way to wait for rpc calls
> with glib? Create a separate thread to wait for calls?

I think you just need to look a little bit harder at
the sun-rpc API.

You can use svc_fdset (and the standard fdset macros)
to find out what file descriptors you need to watch;
g_io_channel_add_watch() to watch them, and 
svc_getreqset() to call back into the rpc library
when input arrives on the file descriptor.

(I've never acually programmed with sun-rpc, but 
the above seems to be the case from a quick look
at the rpc manual page)


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