GithubHelp home page GithubHelp logo

zmq-chat's Introduction

ZMQ Chat ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

This is a simple chat client/server implementation to explore the base ZeroMQ API and, later, try integrating some of the higher level patterns from the zguide. Also utilizes the curses library to provide a text-based user interface.

The client uses a mix of multithreading and ZeroMQ's asynchronous I/O model to separately update the message display/text input interfaces, communicate between components, and send messages and receive replies from the server.

The server simply exposes a port for incoming messages and broadcasts them to all currently connected clients.

If you somehow come across this project and can provide some feedback or ways to improve it, please do!

Try it out!

Install the project (requires Python3 and pip):

git clone https://github.com/jnthnwn/zmq-chat.git
cd zmq-chat
pip3 install -r requirements.txt

Get the server running:

python3 server.py

Get your clients connected:

python3 zmqchat.py <username>

You can modify the configuration file zmq-chat.cfg to specify a particular server host or ports to use, but the defaults will suffice for just playing around.

Now you'll be able to do this:

gif of chat clients talking

Thanks to asciinema2gif and asciinema for this gif.

zmq-chat's People

Contributors

jnthnwn 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.