HH\Lib\Network\Server
Requires the Hack Standard Library - Experimental Additions to be installed.
Facebook Engineer?
This function is available as Network\Server()
in Facebook's www repository.
Generic interface for a class able to accept socket connections
Interface Synopsis
namespace HH\Lib\Network;
interface Server {...}
Public Methods
->getLocalAddress(): this::TAddress
Return the local (listening) address for the server->nextConnectionAsync(): Awaitable<TDSock>
Retrieve the next pending connection as a disposable->nextConnectionNDAsync(): Awaitable<TNDSock>
Retrieve the next pending conenction->stopListening(): void
Stop listening; open connection are not closed