Skip to content

MGW14/PacketLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple Library for using Packets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages