Files
lcdproc/server/clients.h
T

38 lines
802 B
C
Raw Normal View History

1999-12-09 23:15:14 +00:00
#ifndef CLIENTS_H
#define CLIENTS_H
#include "client_data.h"
#include "shared/LL.h"
1999-12-09 23:15:14 +00:00
typedef struct client {
2000-04-03 22:13:57 +00:00
int sock;
char addr[64];
2000-04-03 22:13:57 +00:00
LL *messages;
client_data *data;
1999-12-09 23:15:14 +00:00
} client;
extern LL *clients;
// Initialize and kill client list...
int client_init ();
int client_shutdown ();
1999-12-09 23:15:14 +00:00
// Create and destroy clients....
client *client_create (int sock);
int client_destroy (client * c);
1999-12-09 23:15:14 +00:00
// Add and remove messages from the client's queue...
int client_add_message (client * c, char *message);
char *client_get_message (client * c);
1999-12-09 23:15:14 +00:00
// 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);
1999-12-09 23:15:14 +00:00
// Search for a client with a particular filedescriptor...
client *client_find_sock (int sock);
1999-12-09 23:15:14 +00:00
#endif