2005-03-19 23:16:49 +01:00
|
|
|
/* -*-mode: C; fill-column: 78; c-basic-offset: 4; -*- */
|
|
|
|
|
|
|
|
#ifndef _XWRELAY_PRIV_H_
|
|
|
|
#define _XWRELAY_PRIV_H_
|
|
|
|
|
2005-07-05 23:57:00 +02:00
|
|
|
#include <time.h>
|
2007-12-01 16:00:30 +01:00
|
|
|
#include "lstnrmgr.h"
|
2005-07-05 23:57:00 +02:00
|
|
|
|
2005-10-01 18:33:45 +02:00
|
|
|
typedef unsigned char HostID;
|
2005-03-19 23:16:49 +01:00
|
|
|
|
2005-10-02 18:08:42 +02:00
|
|
|
typedef enum {
|
2005-10-30 06:10:26 +01:00
|
|
|
XW_LOGERROR
|
|
|
|
,XW_LOGINFO
|
|
|
|
,XW_LOGVERBOSE0
|
|
|
|
,XW_LOGVERBOSE1
|
2005-10-02 18:08:42 +02:00
|
|
|
} XW_LogLevel;
|
|
|
|
|
|
|
|
void logf( XW_LogLevel level, const char* format, ... );
|
2005-03-19 23:16:49 +01:00
|
|
|
|
2007-11-13 04:53:10 +01:00
|
|
|
void killSocket( int socket, const char* why );
|
2005-03-19 23:16:49 +01:00
|
|
|
|
2008-12-30 06:13:30 +01:00
|
|
|
bool send_with_length_unsafe( int socket, unsigned char* buf, int bufLen );
|
2005-07-06 03:36:52 +02:00
|
|
|
|
2008-12-31 05:19:23 +01:00
|
|
|
time_t now(void);
|
2005-06-23 06:26:44 +02:00
|
|
|
|
2007-12-01 16:00:30 +01:00
|
|
|
int make_socket( unsigned long addr, unsigned short port );
|
|
|
|
|
|
|
|
extern class ListenerMgr g_listeners;
|
|
|
|
|
2005-03-19 23:16:49 +01:00
|
|
|
#endif
|