mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
df1ec1628a
ahead of processing data arrived on the same socket, with EnqueueKill that adds to same queue from which data's taken. So if device dies immediately after sending data there won't be a race between closing the cref (if this is the last open socket) and handling the data. I'm still dying with assert fails when running 100 games at once, but much less frequently
34 lines
711 B
C
34 lines
711 B
C
/* -*-mode: C; fill-column: 78; c-basic-offset: 4; -*- */
|
|
|
|
#ifndef _XWRELAY_PRIV_H_
|
|
#define _XWRELAY_PRIV_H_
|
|
|
|
#include <time.h>
|
|
#include "lstnrmgr.h"
|
|
#include "xwrelay.h"
|
|
|
|
typedef unsigned char HostID; /* see HOST_ID_SERVER */
|
|
|
|
typedef enum {
|
|
XW_LOGERROR
|
|
,XW_LOGINFO
|
|
,XW_LOGVERBOSE0
|
|
,XW_LOGVERBOSE1
|
|
} XW_LogLevel;
|
|
|
|
void logf( XW_LogLevel level, const char* format, ... );
|
|
|
|
void denyConnection( int socket, XWREASON err );
|
|
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;
|
|
|
|
#endif
|