diff options
author | Ben Burwell <bburwell1@gmail.com> | 2013-05-01 15:39:02 -0400 |
---|---|---|
committer | Ben Burwell <bburwell1@gmail.com> | 2013-05-01 15:39:02 -0400 |
commit | d096b7ac4a2435339f7a7e3de68c51efc07422a0 (patch) | |
tree | 77baaffeb0f75e401ee89849daa0f4bc4d3d99af /localchat.c | |
parent | 79230604a20409ab12c2cb9620df81078ff7fae2 (diff) |
It's beautiful. But actually. Oh my god.
Diffstat (limited to 'localchat.c')
-rw-r--r-- | localchat.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/localchat.c b/localchat.c index 4c9d671..ddc73e1 100644 --- a/localchat.c +++ b/localchat.c @@ -22,8 +22,8 @@ // define constants #define DEBUG 0 #define MAX_NUM_PEERS 100 -#define CMD_PORT 6062 -#define CHAT_PORT 6063 +#define CMD_PORT 6064 +#define CHAT_PORT 6065 #define BROADCAST_IP "192.168.130.255" #define GLOBAL_MSG_LENGTH 1024 @@ -45,21 +45,13 @@ char prompt[16] = ">"; int client_s; char in_buf[GLOBAL_MSG_LENGTH]; char out_buf[GLOBAL_MSG_LENGTH]; -int retcode; -int i; -char * token; struct sockaddr_in client_addr; - int accepted_client; -char accept_out[16]; -char accept_in[128]; +struct sockaddr_in accepted_addr; int respond_to_chat_request = 0; -pthread_t requester_t; -char user_name_request[32]; - // include functions #include "clean_table.h" #include "online.h" @@ -112,7 +104,7 @@ int main(int argc, char const *argv[]) { // enter the user input loop while (1) { - printf("\n %s ", prompt); + printf("%s ", prompt); fgets(command, 256, stdin); process_user_command(); } |