Simple Packet Library - 0.1.0 (beta)
Pre-release
Pre-release
New Features:
WebSocket support
Use Client#useWebSocket(true) and Server#useWebSocket(true) to use a WebSocket instead of a normal Socket.
This allows the library to connect to its JavaScript counterpart.
Improved Error Handling
Instead of simply printing out any errors to the console, you can now use Client#addErrorHandler, Server#addServerErrorHandler, Server#addConnectionErrorHandler, and ServerConnection#addErrorHandler to add better error handlers to the specific parts of the library. The error handlers include the Exception, the source object (a Client, Server, or ServerConnection), and an enum describing what the library was doing.
Function chaining & more getters
Several methods that previously returned null now return this, and the Client and Server classes now have a getter for the ip (Client only) and port.