Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kenzeve/simpletcp

Simple TCP server for PocketMine-MP (PMMP). Simple as never before.
https://github.com/kenzeve/simpletcp

pmmp pmmp-plugin pmmp-virion pmmp4 pocketmine-mp pocketmine-mp-plugin

Last synced: about 21 hours ago
JSON representation

Simple TCP server for PocketMine-MP (PMMP). Simple as never before.

Awesome Lists containing this project

README

        

# SimpleTCP



## Usage
Very simple usage:
```php
$server = SimpleTCP::start("0.0.0.0", 2000, CustomSession::class);
```

`CustomSession.php`:
```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);
}
}
```