*/ namespace Asio; /** * Interface Acceptor * * @package Asio */ interface Acceptor extends IoObject { /** * Put the acceptor into the state where it may accept new connections. * * @param int $backlog[optional] : The maximum length of the queue of pending connections. * Default to `boost::asio::socket_base::max_connections`. * @return int : Error code */ function listen(int $backlog); /** * Asynchronously accept a new connection into a socket. * * @param callable $callback[optional] : Acceptor callback * @param mixed $argument * @return Future : Resolves Socket. */ function accept(callable $callback, $argument = null); /** * Close the acceptor. * * @return int : Error code */ function close(); }