Files
lcdproc/server/clients.h
T
ddouthitt 6a0e23dc3e Massive changes (first commit), including but not limited to:
* Ability to specify port and address to bind to
* By default, binds only to 127.0.0.1 port 13666
* Client commands now return usage when no options given
* New driver command: getinfo
* Added comments all over the place
* Used #defines to further document code
* Used #defines to set up compile-time defaults, etc.
* Cleaned up client command argument analysis in client_functions.c
* Beginning support of syslog
* Some bug fixes
2001-09-21 21:08:10 +00:00

38 lines
802 B
C

#ifndef CLIENTS_H
#define CLIENTS_H
#include "client_data.h"
#include "shared/LL.h"
typedef struct client {
int sock;
char addr[64];
LL *messages;
client_data *data;
} client;
extern LL *clients;
// Initialize and kill client list...
int client_init ();
int client_shutdown ();
// Create and destroy clients....
client *client_create (int sock);
int client_destroy (client * c);
// Add and remove messages from the client's queue...
int client_add_message (client * c, char *message);
char *client_get_message (client * c);
// Get and set the client's data...
// Not used at all yet, and may never be. Oh, well.
int client_set (client * c, void *data);
void *client_get (client * c);
// Search for a client with a particular filedescriptor...
client *client_find_sock (int sock);
#endif