You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
703 B
29 lines
703 B
#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__
|