/** * The constructor, sets properties and calls handleRequest() * * @param TelnetServer $parent parent server object * @param SocketHandlerInterface $handler handler connected to the browser * @param string $request the request * @return void */ public function __construct($handler) { $this->handler = $handler; $this->handler->setCallback('readData', $this); $this->partyline = new partyline(0, 'telnet', $this); }
/** * Gets called when there's a new browser connecting to us, sets the callback * for the new handler and waits for a request * * @param TCPServer $serverHandler The server handler * @param SocketHandlerInterface $handler The new handler * @param integer $error Not used in this case * @return void */ public function newClient($serverHandler, $handler, $error) { $handler->setCallback('clientData', $this); }