aboutsummaryrefslogtreecommitdiff
path: root/localchat.c
diff options
context:
space:
mode:
authorBen Burwell <bburwell1@gmail.com>2013-05-01 12:20:30 -0400
committerBen Burwell <bburwell1@gmail.com>2013-05-01 12:20:30 -0400
commit79230604a20409ab12c2cb9620df81078ff7fae2 (patch)
tree23fa78c1ccb4bae1a7d67102c84b62d369a7e4be /localchat.c
parent0322fefa7f5f465909ccd95c85a088d9cf83812e (diff)
Better?
Diffstat (limited to 'localchat.c')
-rw-r--r--localchat.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/localchat.c b/localchat.c
index 8c1c57a..4c9d671 100644
--- a/localchat.c
+++ b/localchat.c
@@ -22,8 +22,8 @@
// define constants
#define DEBUG 0
#define MAX_NUM_PEERS 100
-#define CMD_PORT 6060
-#define CHAT_PORT 6061
+#define CMD_PORT 6062
+#define CHAT_PORT 6063
#define BROADCAST_IP "192.168.130.255"
#define GLOBAL_MSG_LENGTH 1024
@@ -50,8 +50,16 @@ int i;
char * token;
struct sockaddr_in client_addr;
+
+int accepted_client;
+char accept_out[16];
+char accept_in[128];
+
int respond_to_chat_request = 0;
+pthread_t requester_t;
+char user_name_request[32];
+
// include functions
#include "clean_table.h"
#include "online.h"
@@ -61,8 +69,8 @@ int respond_to_chat_request = 0;
#include "receive.h"
#include "check_user_name.h"
#include "loading.h"
-#include "chat_request.h"
#include "chat_acceptor.h"
+#include "chat_request.h"
#include "user_command.h"
int main(int argc, char const *argv[]) {
@@ -104,7 +112,7 @@ int main(int argc, char const *argv[]) {
// enter the user input loop
while (1) {
- printf("%s ", prompt);
+ printf("\n %s ", prompt);
fgets(command, 256, stdin);
process_user_command();
}