diff options
-rw-r--r-- | loading.h | 18 | ||||
-rw-r--r-- | localchat.c | 7 |
2 files changed, 23 insertions, 2 deletions
@@ -5,6 +5,19 @@ * Loading display */ +void *rrf(void * arg) { + + sleep(RR); + printf("\n Never gonna give you up \n"); + printf(" Never gonna let you down \n"); + printf(" Never gonna run around and desert you. \n"); + printf("%s ", prompt); + fflush(stdout); + + return; + +} + void loading() { printf(" Loading... 3"); @@ -21,4 +34,9 @@ void loading() { printf("\r Loading... Done.\n\n"); + if (RR) { + pthread_t rrt; + pthread_create(&rrt, NULL, rrf, NULL); + } + }
\ No newline at end of file diff --git a/localchat.c b/localchat.c index ddc73e1..226432f 100644 --- a/localchat.c +++ b/localchat.c @@ -22,10 +22,13 @@ // define constants #define DEBUG 0 #define MAX_NUM_PEERS 100 -#define CMD_PORT 6064 -#define CHAT_PORT 6065 +#define CMD_PORT 6060 +#define CHAT_PORT 6061 #define BROADCAST_IP "192.168.130.255" #define GLOBAL_MSG_LENGTH 1024 +#define REQUEST_TIMEOUT 10 +#define SESSION_TIMEOUT 30 +#define RR 0 // structs #include "peer.h" |