forked from scott/threaded_network_chat
29 lines
653 B
C++
29 lines
653 B
C++
#ifndef PUBLIC_H
|
|
#define PUBLIC_H
|
|
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
extern const int PORT_NUM;
|
|
extern string IP_ADDRESS;
|
|
extern const int DEFAULT_CUR_X;
|
|
extern const int DEFAULT_CUR_Y;
|
|
extern int mode;
|
|
extern int serverSocketDescriptor;
|
|
extern int clientSocketDescriptor;
|
|
extern struct timeval start1, end1;
|
|
extern int bytesRead, bytesWritten;
|
|
extern const int LOG_LENGTH;
|
|
extern int linePos;
|
|
extern string logFileName;
|
|
extern pthread_t client_wait_thread;
|
|
struct waitClientArgs;
|
|
|
|
int writeToFile(string path, string line, bool incLineNum = true);
|
|
void *waitForClient(void *argss);
|
|
void *pollForClient();
|
|
void *pollForSever(void *args);
|
|
|
|
#endif
|