65 $connector =
'0.0.0.0:113',
70 $this->socket = stream_socket_server(
'tcp://' . $connector, $errno, $errstr);
73 "Could not create identd server (".$errstr.
")" 86 $this->bot->addConnection($this);
91 $this->bot->removeConnection($this);
92 if ($this->socket !== null) {
93 stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
108 public function emptyReadQueue()
115 $socket = stream_socket_accept($this->socket);
119 $worker =
new $this->workerCls($this->bot,
$socket);
$bot
A bot object implementing the Erebot::Interfaces::Core interface.
Provides core functionalities for Erebot.
$workerCls
Class to use to process IdentD requests.
disconnect($quitMessage=null)
$socket
The underlying socket, represented as a stream.
process()
Processes commands queued in the input buffer.
Interface for a connection that receives data.
A server compatible with the Identification Protocol (RFC 1413).
__construct(\Erebot\Interfaces\Core $bot, $connector= '0.0.0.0:113', $workerCls= '\\Erebot\\Identd\\Worker')