> Is there any major locking issues or whatever I need to look out
>for if I give the system to build any long running threads. I'd
>certainly like to expose an XML-RPC interface, which makes it
>smokinly easy to build clients.
You're best off letting the server API handle this for you. You can use
CtdlRegisterProtoHook() to add a new server protocol. It's disgustingly
easy to do this: all you have to supply it with is a function that
initializes your protocol and prints the greeting, and a function that
gets called whenever the client sends data. All of the gruntwork of
listening for new connections, dispatching worker threads, and
initializing session contexts *is handled for you!* Even the cleanup of
broken sessions (shutting down the socket and removing the session
context) is handled for you, although if you allocated any memory you'll
have to register a cleanup function to free that.
I'd advise studying a simple protocol handler like serv_pop3.c to get an
idea of how to use the Citadel server API to implement a new protocol.
Hmmm... now that I'm re-reading this post, I'm thinking about what a
shame it is that we have such a powerful server API available, and nobody
knows about it. This deserves ink.