ECEN 602 Network Program Assign 2 Fall 2019.pdf - ECEN 602...

This preview shows page 1 - 6 out of 12 pages.

ECEN 602 Fall 2019: Network Programming Assignment #2 Due: Oct. 7, 2019 NLT 5:00 pm Central 1 TCP Simple Broadcast Chat Server and Client ECEN 602 Network Programming Assignment 2 Due Oct 7, 2019 NLT 5:00 pm Central Introduction In this assignment, you will implement the client and server for a simple chat service. The goals of the assignment are to develop a more sophisticated socket programming application than Assignment 1, reading and implementing a more complicated protocol specification, and participating in more extensive interoperability testing. The basic assignment is worth 100 points, but you can earn up to 25 additional points by implementing the Bonus features (see Bonus section below). Assignments must be written in C or C++, and they are to be compiled and tested in a Linux environment. Because the goal of the exercise is to understand system calls to the socket layer, you are prohibited from using any socket “wrapper” libraries; however, you may use libraries for simple data- structures. It is also acceptable, to use the Unix Network Programming, Vol. 1, 3 rd Edition “wrappers” for the basic networking function calls (e.g., socket , bind , listen , accept , connect , close , etc….). These “wrapper” functions check for error returns from the network functions (see Supplementary References). Protocol Specification 1. Overview The Simple Broadcast Chat Protocol (SBCP) is a protocol that allows clients to join and leave a global chat session, view members of the session, and send and receive messages. An instance of the server provides a single “chat room,” which can only handle a finite number of clients. Clients must explicitly JOIN the session. A client receives a list of the connected members of the chat session once they complete the JOIN transaction. Clients use SEND messages to carry chat text, and clients receive chat text from the server using the FWD message. Clients may exit unceremoniously at any time during the chat session. The server should detect a client exit, cleanup the resources allocated to that client and notify the other clients. Additionally, the client program will be able to detect idle clients and notify the server. Some of the above mentioned features are bonus features, which are covered in the last part of the assignment.
ECEN 602 Fall 2019: Network Programming Assignment #2 Due: Oct. 7, 2019 NLT 5:00 pm Central 2 2. Message Format All SBCP messages share a common header format. The format for an SBCP message is: The format for the SBCP attribute is given below. Note that zero or more SBCP Attributes are the ”payload” of an SBCP Message.
ECEN 602 Fall 2019: Network Programming Assignment #2 Due: Oct. 7, 2019 NLT 5:00 pm Central 3 3. Message Sequences The following is a very brief sequence diagram showing a client JOIN a chat, SEND a message, which is broadcast (FWD) to any other client participants.
ECEN 602 Fall 2019: Network Programming Assignment #2 Due: Oct. 7, 2019 NLT 5:00 pm Central 4 4. Client Operations 5. Server Operations
ECEN 602 Fall 2019: Network Programming Assignment #2 Due: Oct. 7, 2019 NLT 5:00 pm Central 5 6. Input/Output Multiplexing

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture