An open API service indexing awesome lists of open source software.

https://github.com/jongminchoi98/chat-application


https://github.com/jongminchoi98/chat-application

tcp-sockets

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Peer‑to‑Peer Chat Application

## 📋 Team & Contributions

| Member Name | Student ID | Contribution |
|---------------|------------|---------------------------------------------------------|
| Jongmin Choi | 203874794 | Server/client socket logic; connection management |
| Marzia Mehr | 109951593 | Server/client socket logic; connection management |


## 🖥️ Prerequisites

- **Node.js ≥ 18.x**

## 🚀 Installation & Setup

1. Unzip `jongmin_choi_203874794.zip`.

## ▶️ Running

Open a terminal for each peer and run:

```bash
node chat.js
```


## 💬 Commands

| Command | Description |
|-----------------------------------|----------------------------------------------------|
| `help` | Show all available commands |
| `myip` | Display this process’s IPv4 address |
| `myport` | Display the listening port number |
| `connect ` | Establish a new TCP connection to `:` |
| `list` | List all active connections (ID, IP address, port) |
| `terminate ` | Close the specified connection by its ID |
| `send ` | Send a message (max 100 chars) to the given ID |
| `exit` | Terminate all connections and exit the program |