Code Monkey home page Code Monkey logo

duckchat's Introduction

DuckChat

UO CS 432: Intro to Networks - Programming Assignments 1 & 2
Uses the Berkley Sockets API with UDP sockets

v1

A client-server chat CLI application

Compile with the provided make file.

$ make all

Usage

NOTE: A server must be launched before clients can join and communicate with each other.

Launching the server

$ ./server <server_ip> <server_port>

Launching a client

$ ./client <server_ip> <server_port> <client_name>

Available commands beyond just sending a message without "/" at the beginning.
  • /exit - Logs out the user and quits the client software.
  • /join - Subscribes the client to the channel named , server will create the channel if it does not exist.
  • /leave - Unsubscribes the client from .
  • /list - Lists the names of all channels created on the server.
  • /who - Lists the names of the other active users on .
  • /switch - Switches the clients active chat channel to .

v2

A client-server chat CLI application that has server-to-server communication. Servers maintain an active network tree and prunes unecessary connections or connections that cause loops in the network.

Compile with the provided make file.

$ make all

Usage

Launching the servers

Servers can be launched the same as before.
$ ./server <server_ip> <server_port>

To link multiple servers together for server-to-server communication you must specify each neighbor following the server's ip and port.
$ ./server <server_ip> <server_port> [[neighbor_ip] [neighbor_port]...]

The start start_servers.sh shell script will launch a few different server tree configurations that can be commented and uncommented out. $ ./start_servers.sh

Launching a client

Clients may join any of the launched servers and the communication between users will be handled by the connected servers. $ ./client <server_ip> <server_port> <client_name>

All the commands as before in v1 are the same.

NOTE: The /who command only shows individuals connected to the client's server they connected to.

duckchat's People

Contributors

natekoch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.