server.h
703 Bytes
#ifndef __SERVER_H__
#define __SERVER_H__
#include <stdio.h> /* for printf() and fprintf() */
#include <sys/select.h> /* for select system call and related */
#include "client.h"
typedef struct {
int servSock;
tClient clients[FD_SETSIZE];
unsigned int maxFd;
fd_set socks;
char logPath[512];
char namePat[512];
FILE * wHandle;
} tServer;
void serverShutdown(tServer * server);
void serverInit(
tServer * server,
unsigned int port,
unsigned int pending,
const char * logPath,
const char * namePat);
void serverRun(tServer * server);
#endif // __SERVER_H__