initial commit

This commit is contained in:
2026-03-12 15:56:28 -05:00
commit 5e41e88961
18 changed files with 770 additions and 0 deletions

28
public.h Normal file
View File

@@ -0,0 +1,28 @@
#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