src/Transport.php
public function setHandler($type, \fpoirotte\Pssht\HandlerInterface $handler)
    {
        if (!is_int($type) || $type < 0 || $type > 255) {
            throw new \InvalidArgumentException();
        }

        $this->handlers[$type] = $handler;
        return $this;
    }
public function setHandler($type, \fpoirotte\Pssht\HandlerInterface $handler)
    {
        if (!is_int($type) || $type < 0 || $type > 255) {
            throw new \InvalidArgumentException();
        }

        $this->handlers[$type] = $handler;
        return $this;
    }
public function setHandler ( $ type , \ fpoirotte \ Pssht \ HandlerInterface $ handler ) { if ( ! is_int ( $ type ) || $ type < 0 || $ type > 255 ) { throw new \ InvalidArgumentException ( ) ; } $ this -> handlers [ $ type ] = $ handler ; return $ this ; }
Register a handler for a specific SSH message type.

\param int $type
Message type.

\param fpoirotte::Pssht::HandlerInterface $handler
Handler to register for that message type.

\retval Transport
Returns this transport layer.

\note
The given handler will overwrite any previously
registered handler for that message type.
Register a handler for a specific SSH message type .