2001-09-09 22:21:46 -04:00
|
|
|
#ifndef __CONNECTION_H__
|
|
|
|
#define __CONNECTION_H__
|
|
|
|
|
2001-10-20 17:28:09 -04:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include "compat.h"
|
2001-10-20 02:51:29 -04:00
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
typedef struct connection_tag
|
|
|
|
{
|
|
|
|
unsigned long id;
|
|
|
|
|
|
|
|
time_t con_time;
|
2001-10-20 02:43:04 -04:00
|
|
|
uint64_t sent_bytes;
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
int sock;
|
|
|
|
int error;
|
|
|
|
|
|
|
|
char *ip;
|
|
|
|
char *host;
|
|
|
|
} connection_t;
|
|
|
|
|
|
|
|
void connection_initialize(void);
|
|
|
|
void connection_shutdown(void);
|
|
|
|
void connection_accept_loop(void);
|
|
|
|
void connection_close(connection_t *con);
|
|
|
|
|
|
|
|
#endif /* __CONNECTION_H__ */
|