Code Monkey home page Code Monkey logo

socktalk's Introduction

SockTalk

C++ implementation of the SockTalk protocol (described in PROTOCOL.md) as a statically linked library as well as a command line frontend

The SockTalk protocol is a simple, open-source network communication protocol. Communication is optionally encrypted using SSL.

Compiling SockTalk requires that the OpenSSL library be installed.

Frontend commands

  • /close - from server side closes server socket.
  • /disconnect - from client side disconnects from server.
  • /help - gives a list of commands supported by the server.
  • /kick, /ban, /unban - prompts for a username and kicks/bans/unbans the user with the given username

Legal

Source code available under GPLv3, except linking the OpenSSL library is allowed. OpenSSL available under its own license. See LICENSE.txt for more details.

Work is based on a project by Matthew Chen and Arc676/Alessandro Vinciguerra available under MIT license here

socktalk's People

Contributors

arc676 avatar

Watchers

 avatar  avatar

Forkers

eshad

socktalk's Issues

User management

User management is an important feature for any communication platform. The SockTalk protocol needs to be updated to include kicking and banning users (IP addresses).

Storing the IP address associated with each client handler is useful anyway.

Move server and client initialization out of constructors

Currently, all work initializing the server and client occurs right in the constructor. This makes it hard to use the library in GUI frontends, as the application can be in a running but disconnected state.

In the Swift framework, this work is done in callable initialization functions. This allows the code to be run when the user is ready.

Termination yields disconnection message

When users are kicked, they still receive a “disconnected” message, but with no username. After being sent the TERM message, they shouldn’t receive any more data.

UDP mode

If the SockTalk protocol is to be used for sending state data in games, the addition of a UDP mode might be in order.

This could reduce latency for streams of data that don’t need TCP reliability.

Move username checking out of client handler constructor

Currently, the client handler constructor code reads from the socket to obtain the desired username of the newly connected user. However, this is a blocking operation and means that the accept thread will be blocked indefinitely if the new connection simply refuses to send a username.

This should be fixed by:

  • Adding a timeout so connections that don't send a username (and thus violate the protocol) are dropped
  • Moving the username check out of the constructor or at least letting an asynchronous code block execute it such that the accept thread isn't blocked

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.