forked from scott/threaded_network_chat
ugh
This commit is contained in:
39
chat.h
39
chat.h
@@ -1,46 +1,7 @@
|
||||
#ifndef CHAT_H
|
||||
#define CHAT_H
|
||||
|
||||
#ifndef _GLIBCXX_STRING
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
#ifndef _NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
NO_MODE = 0,
|
||||
SERVER_MODE = 1,
|
||||
CLIENT_MODE = 2
|
||||
} chatmode_t;
|
||||
|
||||
typedef struct {
|
||||
sockaddr_in new_addr;
|
||||
socklen_t new_addr_siz;
|
||||
int aux;
|
||||
}wclient_args_t;
|
||||
|
||||
const int CURSOR_DEFAULT_POSITION_X = 2;
|
||||
const int CURSOR_DEFAULT_POSITION_Y = 12;
|
||||
|
||||
const int LOG_LENGTH = 10;
|
||||
int line_position = 0;
|
||||
|
||||
struct timeval time_start;
|
||||
struct timeval time_end;
|
||||
int bytes_read;
|
||||
int bytes_written;
|
||||
|
||||
int listen_port = 9999;
|
||||
std::string listen_ip_address = "127.0.0.1";
|
||||
|
||||
std::string log_path;
|
||||
|
||||
int socket_descriptor_server;
|
||||
int socket_descriptor_client;
|
||||
|
||||
pthread_t client_wait_thread;
|
||||
|
||||
void *await_client(void *a);
|
||||
void clear_rows(int s, int e);
|
||||
|
||||
Reference in New Issue
Block a user