Swoole Coroutine Socket

Swoole\Coroutine\Socket

Coroutine Socket can be used same as PHP Socket.

Coroutine\Socket->__construct(int $domain, int $type, int $protocol=0) : resource
Coroutine\Socket->bind(resource $socket , string $address [, int $port = 0 ] ) : bool
Coroutine\Socket->listen(resource $socket [, int $backlog = 0 ]) : bool
Coroutine\Socket->accept(resource $socket) : resource
Coroutine\Socket->connect(resource $socket , string $address [, int $port = 0 ]) : bool
Coroutine\Socket->send(resource $socket , string $buf , int $len , int $flags) : int
Coroutine\Socket->recv(resource $socket , string &$buf , int $len , int $flags) : int
Coroutine\Socket->sendto(resource $socket , string $buf , int $len , int $flags , string $addr [, int $port = 0 ]) : int
Coroutine\Socket->recvfrom(resource $socket , string &$buf , int $len , int $flags , string &$name [, int &$port ]) : int
Coroutine\Socket->getsockname() : array
Coroutine\Socket->getpeername() : array
Coroutine\Socket->close() : bool