ECEN424 Fundamentals of Networking

2 Problem Statement In this assignment, implement a server and a client using Java sockets. The server and client must use a TCP connection to communicate with each other. Server The server must have the capability to handle multiple clients simultaneously. The server takes as console input the port number on which clients would connect to it and the maximum number of clients that can connect simultaneously. >./ s e r v e r Upon initialization, the server program asks the user to enter a string (str), e.g., “HelloWorld,” and a positive integer (N). Whenever a client is connected to the server, the server transmits str to the client N times, with a one-second pause between transmissions. The first N-1 transmissions have no end-of-string or newline character at the end. The last transmission ends with a newline character. Client The client takes as console input the IP and the port number of the server in order to connect. >./ c l i e n t You will write two versions of the client. The first version, which we call the NaiveClient, displays every character it receives immediately. The second version, which we call the BufferClient, buffers all incoming characters and only displays everything when it receives a newline character. Both clients terminate after receiving and printing the newline character.

DETAILED ASSIGNMENT

20210319022036mp3

Powered by WordPress