You are browsing as a guest. Sign up (or log in) to start making projects!

3h 31m 45s logged

TCP Server and Packets

I got a TCP Socket server running and receiving bytes from a minecraft client.
I also created a bunch of packets that are a subclass of the Packet class. This allows me to create any packet type I want w/ client or serverbound properties and what id they have. It’ll make it easier to change the IDs when they eventually change in future updates.

The server works by spawning a clientHandler thread when a client connects to the tcp server
It keeps reading bytes until the client ends the connection
Everytime we receive bytes from the client we decode as much as we can, and then we handle each of them in a FIFO style.

0
11

Comments 0

No comments yet. Be the first!