*** empty log message ***

This commit is contained in:
cvs
2000-03-15 11:29:50 +00:00
parent 952b84dedb
commit b9b30e7d62
14 changed files with 1518 additions and 6 deletions

35
tecs/server.h Normal file
View File

@@ -0,0 +1,35 @@
#include "coc.h"
struct CocClient { struct CocClient *next; int fd; int mode; char cmd[80]; char res[80]; };
int CocInitServer(int bufsize, int port);
int CocHandleRequests(int tmo_msec, int fd);
int CocHandle1Request(int tmo_msec, int fd);
/*
handle hetwork requests.
return value: <0: error
=0: error
=1: event on fd
=2: variable was changed
=3: other network request treated
CocHandle1Request handles only one network request
For CocHandleRequests:
if fd=0: returns when a network request has changed a variable,
or when timeout has expired
if fd>0: returns when an read event is pending on fd
or when timeout has expired
*/
struct CocClient *CocGetNextCmd();
/*
get next client with a pending command
*/
void CocCloseServer();