Very simple usage:
$server = SimpleTCP::start("0.0.0.0", 2000, CustomSession::class);
CustomSession.php
:
class CustomSession extends Session{
public function handlePacket(string $packet) : void{
//packet handling stuff here
//now I just send back packet I got from client
$this->write($packet);
}
}