From 1129a1d6b9bd64bedb04600e068fac1922ee34ff Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Wed, 2 Feb 2011 09:17:20 +0100 Subject: [PATCH] add comment about new structure --- src/include/server.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/include/server.h b/src/include/server.h index bc9a51f..6dd051b 100644 --- a/src/include/server.h +++ b/src/include/server.h @@ -6,6 +6,31 @@ #include "client.h" +/* + * tClient does not belong here....it's an unneccessary external + * dependency. + * Except that the server should implement methods to read and + * write to sockets and give the possibility to define + * a dataAvailable(Callback|Hook) when data comes available. + * additinally an acceptHook. Data will be written as soon as + * the is date within the writebuffer of the connection and the + * connection becomes ready for writing... + * No threaded handling neccessary for writes!!! As soon as there + * is data to write the server puts the handle into wfds and + * whenever the socket it ready for writing data will be written. + * This happens as long as there remains data in the writebuffer. + * After that the handle will no longer be written to wfds or + * it will be closed at all if we define that on request should + * have only one answer...maybe we have to create a hook again + * to give the client the possibility to trigger a connection end. + * + * One NOTE: If we want to use preforked workers in future we have + * to ffigure out how to handle an open filehandle from one process + * to another. To make the worker exchangeable at runtime it needs + * to be a shared object or such... + * And we need to be careful to define a sane ABI. + * !!! Maybe this stuff should then be called connection worker. !!! + */ typedef struct { int servSock; tClient clients[FD_SETSIZE];