CSEE 4119 Computer Networks Programming Assignment 1 Jahyun Kim (jk3111) TEST CASE 1 Server 536 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -s 2000 [Server is ready...] [Server ip: 192.168.0.17] Client x 519 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -c x 192.168.0.17 2000 3000 Enter reg to register. reg x [Welcome! You are registered.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online send y hello [Message received by y.] Enter the desired command. send to send the message to client . dereg to de-register. Sender: y Time: 2015-07-15 08:59:25.198 Message: hi Enter the desired command. send to send the message to client . dereg to de-register. send z hello Enter the desired command. send to send the message to client . dereg to de-register. [Message received by z.] Enter the desired command. send to send the message to client . dereg to de-register. Sender: z Time: 2015-07-15 09:00:02.558 Message: hi Enter the desired command. send to send the message to client . dereg to de-register. dereg x [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - offline y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online [You are offline. Bye.] ^C520 ginny0620:src$ 520 ginny0620:src$ clear 521 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -c x 192.168.0.17 2000 3000 Enter reg to register. reg x [Welcome! You are registered.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online send y hi [Message received by y.] Enter the desired command. send to send the message to client . dereg to de-register. Sender: y Time: 2015-07-15 09:03:27.188 Message: hello Enter the desired command. send to send the message to client . dereg to de-register. send z hi [Message received by z.] Enter the desired command. send to send the message to client . dereg to de-register. Sender: z Time: 2015-07-15 09:03:37.657 Message: hello Enter the desired command. send to send the message to client . dereg to de-register. dereg x [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - offline y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online [You are offline. Bye.] ^C522 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -c x 192.168.07 2000 3000 Enter reg to register. reg x [Welcome! You are registered.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online [Off-line Messages: ] Sender: y Time: 2015-07-15 09:04:46.261 Message: miss you Sender: z Time: 2015-07-15 09:05:28.271 Message: miss you miss you [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - offline z - /192.168.0.17 - 4000 - online dereg x [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - offline y - /192.168.0.17 - 5000 - offline z - /192.168.0.17 - 4000 - online [You are offline. Bye.] Client y 521 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -c y 192.168.0.17 2000 5000 Enter reg to register. reg y [Welcome! You are registered.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online Sender: x Time: 2015-07-15 09:03:21.221 Message: hi Enter the desired command. send to send the message to client . dereg to de-register. send x hello [Message received by x.] Enter the desired command. send to send the message to client . dereg to de-register. Sender: z Time: 2015-07-15 09:03:59.658 Message: bonjour Enter the desired command. send to send the message to client . dereg to de-register. send z bonjour [Message received by z.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - offline y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online send x miss you [No ACK from x, message sent to server.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online dereg y [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - offline z - /192.168.0.17 - 4000 - online [You are offline. Bye.] Client z 509 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -c z 192.168.0.17 2000 4000 Enter reg to register. reg z [Welcome! You are registered.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online Sender: x Time: 2015-07-15 09:03:32.98 Message: hi Enter the desired command. send to send the message to client . dereg to de-register. send x hello [Message received by x.] Enter the desired command. send to send the message to client . dereg to de-register. send y bonjour [Message received by y.] Enter the desired command. send to send the message to client . dereg to de-register. Sender: y Time: 2015-07-15 09:04:11.458 Message: bonjour Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - offline y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online send x miss you miss you [No ACK from x, message sent to server.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online z - /192.168.0.17 - 4000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - offline z - /192.168.0.17 - 4000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - offline y - /192.168.0.17 - 5000 - offline z - /192.168.0.17 - 4000 - online dereg z [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - offline y - /192.168.0.17 - 5000 - offline z - /192.168.0.17 - 4000 - offline [You are offline. Bye.] TEST CASE 2 Server 538 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -s 2000 [Server is ready...] [Server ip: 192.168.0.17] Client x 545 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -c x 192.168.0.17 2000 3000 Enter reg to register. reg x [Welcome! You are registered.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - offline send y hi [Server not responding...] [Exiting...] Client y 539 ginny0620:src$ java -Djava.net.preferIPv4Stack=true UdpChat -c y 192.168.0.17 2000 5000 Enter reg to register. reg y [Welcome! You are registered.] Enter the desired command. send to send the message to client . dereg to de-register. [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - online dereg y [Client table updated.] [Table of Clients.] - - - x - /192.168.0.17 - 3000 - online y - /192.168.0.17 - 5000 - offline [You are offline. Bye.]