Git Product home page Git Product logo

communicationsframework's Introduction

CommunicationsFramework

Formally named PacketAPI. This was originally a small wrapper to connect Clients <-> Servers using the java.net library (non NIO) I wrote to aid me in writing some private projects, it quickly evolved into a very neat API to allow listeners and hooks for different packets and events. java.net was quickly replaced with the superior Netty (using NIO) and many improvements were made. This project was also I way for me to learn how to use the Netty API and it has been very fun. I do not claim to be an experienced with Netty so I may have made some mistakes.

Features

  • Easy persistent Client <-> Server connections.
  • Secure connections with a key.
  • Create your own packets with ease.
  • Listen for connection events (such as connected, lost connection, reconnect and more to be added).
  • Automatic handling of reconnects.
  • Packet queue system which allows packets to be queued for sending when the connection currently isn't available (waiting for connection or reconnecting).
  • Graceful disconnecting, no more exception spams when one side disconnects for whatever reason.
  • Heartbeats which allow us to determine if the other side has disconnected quickly.
  • Fully documented frontend, no need to deal with confusing internals (just make sure you only use classes within the "api" package).

Coming Soon

  • Better way of handling very simple packets

Usage

JavaDoc

Examples are included in the "example" package.

Contributing

  • Install the Java 7 JDK if you haven't already.
  • Install Maven 3.
  • Fork this repo and make your changes.
  • To compile: mvn clean install.
  • Submit the PR

Code Requirements

FAQ

My connection(s) won't connect but I don't get any errors

Make sure your calling clientConnection.connect() or serverConnection.bind() depending on the type of connection your using. If that still doesn't solve it, check each connections hostname and port is setup correctly.

Licensing

We're GPL v3, for more details, see here

communicationsframework's People

Contributors

keir-nellyer avatar overcaste avatar

Watchers

Adam Galtrey 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.