Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 507 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 507 Bytes

SimpleTCP

Usage

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);
	}
}