A coroutine-based interface for creating a TCP server and accepting connections.
Server::accept(bool $autoClose = true): \Generator
A coroutine that is resolved with a
Icicle\Socket\Socket object when a connection is accepted.
Coroutine: Calls to this function must be preceded with
yield within another coroutine or wrapped with
new Coroutine() to create an awaitable.
bool $autoClose = true
trueto have the return
Socketobject close automatically on destruct,
falseto avoid automatic closure. Only in rare circumstances should this parameter be
- Accepted client socket.
- If the server already had an accept pending.
- If the server was previously closed.
- If the server is closed during pending accept.
Returns the local IP address as a string.
Returns the local port.Next: Server\ServerFactory