HH\Lib\TCP\Server
Requires the Hack Standard Library - Experimental Additions to be installed.
Facebook Engineer?
This function is available as TCP\Server()
in Facebook's www repository.
Interface Synopsis
namespace HH\Lib\TCP;
final class Server implements \HH\Lib\Network\Server<Socket, DisposableSocket, CloseableSocket> {...}
Public Methods
::createAsync(\HH\Lib\Network\IPProtocolVersion $ipv, string $host, int $port, ServerOptions $opts = array ( )): Awaitable<this>
Create a bound and listening instance->getLocalAddress(): (string, int)
->nextConnectionAsync(): Awaitable<DisposableSocket>
->nextConnectionNDAsync(): Awaitable<CloseableSocket>
->stopListening(): void