Showing
1 changed file
with
25 additions
and
0 deletions
... | ... | @@ -6,6 +6,31 @@ |
6 | 6 | |
7 | 7 | #include "client.h" |
8 | 8 | |
9 | +/* | |
10 | + * tClient does not belong here....it's an unneccessary external | |
11 | + * dependency. | |
12 | + * Except that the server should implement methods to read and | |
13 | + * write to sockets and give the possibility to define | |
14 | + * a dataAvailable(Callback|Hook) when data comes available. | |
15 | + * additinally an acceptHook. Data will be written as soon as | |
16 | + * the is date within the writebuffer of the connection and the | |
17 | + * connection becomes ready for writing... | |
18 | + * No threaded handling neccessary for writes!!! As soon as there | |
19 | + * is data to write the server puts the handle into wfds and | |
20 | + * whenever the socket it ready for writing data will be written. | |
21 | + * This happens as long as there remains data in the writebuffer. | |
22 | + * After that the handle will no longer be written to wfds or | |
23 | + * it will be closed at all if we define that on request should | |
24 | + * have only one answer...maybe we have to create a hook again | |
25 | + * to give the client the possibility to trigger a connection end. | |
26 | + * | |
27 | + * One NOTE: If we want to use preforked workers in future we have | |
28 | + * to ffigure out how to handle an open filehandle from one process | |
29 | + * to another. To make the worker exchangeable at runtime it needs | |
30 | + * to be a shared object or such... | |
31 | + * And we need to be careful to define a sane ABI. | |
32 | + * !!! Maybe this stuff should then be called connection worker. !!! | |
33 | + */ | |
9 | 34 | typedef struct { |
10 | 35 | int servSock; |
11 | 36 | tClient clients[FD_SETSIZE]; | ... | ... |
Please
register
or
login
to post a comment