Computer Networks Assignment 3: Replicating Chat Server and Client, Slides of Computer Networks

A programming assignment for cmsc 417 computer networks students in fall 2021. The goal is to reverse engineer a chat server and its protocol to create a compatible replacement or implement a compatible client. Details on the client and server, their functionalities, and the grading process.

Typology: Slides

2021/2022

Uploaded on 09/12/2022

brandonflowers
brandonflowers 🇬🇧

4

(13)

233 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMSC 417 Computer Networks Fall 2021
Programming Assignment 3
Assigned: October 7 Due: October 22, 11:59:59 PM. Weight: 1.5x
1 Introduction
In this project, we will be providing a chat client and will host a chat server. Clients allow users to
communicate with one another by connecting to the server and interacting with it in accordance to
an application protocol. Through this protocol, the server allows clients to engage in group chats
in chat rooms and send private messages to one another.
Your task will be to reverse engineer the chat server and its protocol and use this information
to write a compatible replacement. Alternatively, you may elect to take a 20 point penalty and
instead implement a compatible client.
2 Client (Provided)
The client is available in the ‘materials’ repository under the ‘assignment3’ directory. The provided
client takes single optional command line argument:
1. -u = Run with limited ncurses support for a slightly better chat experience.
While running, the client takes commands directly from the user. All commands are preceded
by a backslash. Not every command is available in every context. The client supports the following
commands:
1. \connect <IP Address>:<Port>= Instruct the client to connect to a new chat server,
specified by the IP address and port.
2. \disconnect = If connected to a server, disconnect from that server.
3. \join <Room> <Password>= Join the specified chatroom, creating it if it does not
already exist. The Password is optional, with the default being the empty string. Users may
only join rooms for which they know the password. Both Room and Password must be less
than 256 characters in length.
4. \leave = If in a room, this exits the room. Otherwise, it leaves the server.
5. \list users = List all users. If in a room, it lists all users in that room. Otherwise, it lists
all users connected to the server.
6. \list rooms = List all rooms that currently exist on the server.
7. \msg <User> <Message>= Send a private message to the specified user. User must be
less than 256 characters in length, and the Message must be less than 65536 characters in
length.
1
pf3

Partial preview of the text

Download Computer Networks Assignment 3: Replicating Chat Server and Client and more Slides Computer Networks in PDF only on Docsity!

CMSC 417 Computer Networks Fall 2021

Programming Assignment 3

Assigned: October 7 Due: October 22, 11:59:59 PM. Weight: 1.5x

1 Introduction

In this project, we will be providing a chat client and will host a chat server. Clients allow users to communicate with one another by connecting to the server and interacting with it in accordance to an application protocol. Through this protocol, the server allows clients to engage in group chats in chat rooms and send private messages to one another. Your task will be to reverse engineer the chat server and its protocol and use this information to write a compatible replacement. Alternatively, you may elect to take a 20 point penalty and instead implement a compatible client.

2 Client (Provided)

The client is available in the ‘materials’ repository under the ‘assignment3’ directory. The provided client takes single optional command line argument:

  1. -u = Run with limited ncurses support for a slightly better chat experience.

While running, the client takes commands directly from the user. All commands are preceded by a backslash. Not every command is available in every context. The client supports the following commands:

  1. \connect : = Instruct the client to connect to a new chat server, specified by the IP address and port.
  2. \disconnect = If connected to a server, disconnect from that server.
  3. \join = Join the specified chatroom, creating it if it does not already exist. The Password is optional, with the default being the empty string. Users may only join rooms for which they know the password. Both Room and Password must be less than 256 characters in length.
  4. \leave = If in a room, this exits the room. Otherwise, it leaves the server.
  5. \list users = List all users. If in a room, it lists all users in that room. Otherwise, it lists all users connected to the server.
  6. \list rooms = List all rooms that currently exist on the server.
  7. \msg = Send a private message to the specified user. User must be less than 256 characters in length, and the Message must be less than 65536 characters in length.
  1. \nick = Set your nickname to the specified name. Name must be less than 256 characters in length.
  2. \quit = Exits out of the client.

All other input is interpreted as a message being sent to the room the user is currently in.

3 Server (Hosted)

We will be running a server; see Piazza for details.

4 Replica Implementations

4.1 Client

Your replica client must not take any required arguments, and does not need to support the - u option. The output of your replica client must exactly match that of the provided client for all sequences of commands and messages. You can test your replica client implementation by comparing the output to that of the provided client using diff.

4.2 Server

Your replica server must support the following command line arguments:

  1. -p = The port that the server will listen on. Represented as a base-10 integer. Must be specified.

5 Grading

Your project grade will depend on how much client functionality is maintained when connecting to your server. We will test your server by running the client in standard input and output mode (i.e., without the -u option) and directly comparing the output with identical input against your server and the reference implementation. If you elect to implement the client instead of the server (and take the 20 point penalty), we will diff the output of your client when fed identical input against the reference client in standard input and output mode. We strongly encourage you to write tests against the reference implementation to compare against your own implementation.

6 Additional Requirements

  1. Your code must be submitted as a series of commits that are pushed to the origin/master branch of your Git repository. We consider your latest commit prior to the due date/time to represent your submission.
  2. The directory for your project must be called ‘assignment3’ and be located at the root of your Git repository.