Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 663 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 663 Bytes

PacketLib

Makes working with Sockets easier

How to use

First you will need a Server.

ServerHandler sh = new ServerHandler(new ServerSocket(12345));

You can add 2 types of Listeners a ServerEvent, which activates whenever something with the Server happens or a PacketEvent which gets called when the Server recieves a Packet.

Now to the Client Part:

ConnectionHandler ch = new ConnectionHandler(new Socket(12345));

Here you can add only one Event, which activates whenever you recieve a Packet.

Packets

Every Packet has the ID of the Sender and a Version ID. Create a new Packet and let it extend from Packet

MCPfannkuchenYT