Last change
on this file was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
803 bytes
|
Rev | Line | |
---|
[c5c522c] | 1 | #ifndef CLIENTS_H |
---|
| 2 | #define CLIENTS_H |
---|
| 3 | |
---|
| 4 | #include "client_data.h" |
---|
| 5 | #include "../shared/LL.h" |
---|
| 6 | |
---|
| 7 | typedef struct client |
---|
| 8 | { |
---|
| 9 | int sock; |
---|
| 10 | LL *messages; |
---|
| 11 | client_data *data; |
---|
| 12 | |
---|
| 13 | } client; |
---|
| 14 | |
---|
| 15 | extern LL *clients; |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | // Initialize and kill client list... |
---|
| 19 | int client_init(); |
---|
| 20 | int client_shutdown(); |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | // Create and destroy clients.... |
---|
| 24 | client * client_create(int sock); |
---|
| 25 | int client_destroy(client *c); |
---|
| 26 | |
---|
| 27 | // Add and remove messages from the client's queue... |
---|
| 28 | int client_add_message(client *c, char *message); |
---|
| 29 | char * client_get_message(client *c); |
---|
| 30 | |
---|
| 31 | // Get and set the client's data... |
---|
| 32 | // Not used at all yet, and may never be. Oh, well. |
---|
| 33 | int client_set(client *c, void *data); |
---|
| 34 | void * client_get(client *c); |
---|
| 35 | |
---|
| 36 | // Search for a client with a particular filedescriptor... |
---|
| 37 | client * client_find_sock(int sock); |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.