xwords/xwords4/relay/xwrelay_priv.h

36 lines
759 B
C
Raw Normal View History

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>
#include "lstnrmgr.h"
#include "xwrelay.h"
2005-07-05 23:57:00 +02:00
typedef unsigned char HostID; /* see HOST_ID_SERVER */
2005-03-19 23:16:49 +01:00
typedef enum {
XW_LOGERROR
,XW_LOGINFO
,XW_LOGVERBOSE0
,XW_LOGVERBOSE1
} XW_LogLevel;
void logf( XW_LogLevel level, const char* format, ... );
2005-03-19 23:16:49 +01:00
void denyConnection( int socket, XWREASON err );
void killSocket( int socket, const char* why );
bool send_with_length_unsafe( int socket, unsigned char* buf, int bufLen );
time_t uptime(void);
int GetNSpawns(void);
int make_socket( unsigned long addr, unsigned short port );
const char* cmdToStr( XWRELAY_Cmd cmd );
extern class ListenerMgr g_listeners;
2005-03-19 23:16:49 +01:00
#endif