aboutsummaryrefslogtreecommitdiffstats
path: root/apps/clients.h
blob: c59a521c49fac7e689de69338e00fba5d2926b3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * clients.h:
 *
 * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

/*
 * $Id$
 */

/*
 * $Log$
 * Revision 1.3  2008/02/14 02:46:44  james
 * *** empty log message ***
 *
 * Revision 1.2  2008/02/14 00:57:58  james
 * *** empty log message ***
 *
 * Revision 1.1  2008/02/13 18:05:06  james
 * *** empty log message ***
 *
 */

#ifndef __CLIENTS_H__
#define __CLIENTS_H__

typedef struct Client_struct
{
  struct Client_struct *next;
  Socket *s;
  int dead;
} Client;

typedef struct
{
  Client *head;
  int n;
} Clients;


extern Clients *clients_new (void);
extern void clients_pre_select (Clients *, fd_set *, fd_set *);
extern void clients_post_select (Clients *, Context *, fd_set *, fd_set *);
extern Client *clients_new_client (Clients *, Socket *, Context *);
extern void clients_shutdown (Clients *);
extern int clients_output (Clients *, void *, int);

#endif /* __CLIENTS_H__ */