using FDs in a listener
Matt Small <[email protected]> Fri, 6 Sep 2002 14:28:50 -0700
| Newsgroups | gmane.network.beep.roadrunner.general |
|---|---|
| Message-ID | <[email protected]> |
Just a (sort of) quick question. I have a list of file descriptors; some of which will be BEEP connections, some of which aren't. I'm using select() on the lot of them; when I have one that has an event, I'd like to be able to pass it into the RoadRunner library, and have it proceed as normal. Looking at the functions, it looks almost like I could do this: fd=select(); connection=rr_tcp_connection_new_unconnected(); rr_tcp_connection_connect_fd(connection, fd, RR_ROLE_LISTENER, ...); After this, though, I'm not sure where to proceed. Ideally, I suppose, the RoadRunner library would then go off and deal with the connection, and close the fd, letting me continue to wait for other connections (BEEP, or my other contents.) I can add this connection to an RRListener object, and then start the main loop, but then I won't be able to service further connections. Is there a way to do this? Any other recommendations? Thanks, Matt [email protected]