Skip to content

A non-blocking TCP networking library for PocketMine-MP

Notifications You must be signed in to change notification settings

brokiem-pm-pl/Sobana

 
 

Repository files navigation

Sobana

A non-blocking TCP networking library for PocketMine-MP

Example

Creating TCP Server

  • Creating Server
$server = Sobana::createServer("0.0.0.0", 8080, MySession::class);
$server->start();
  • Creating Session
class MySession extends ServerSession{

    public function handlePacket(string $packet): void{
        $this->write("HTTP/1.1 200 OK\r\nContent-Length: 11\r\n\r\nHello World");
        $this->close();
    }
}

About

A non-blocking TCP networking library for PocketMine-MP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%