Zebra\Client::connect PHP Method

connect() protected method

Connect to printer.
protected connect ( string $host, integer $port ) : boolean
$host string
$port integer
return boolean
    protected function connect($host, $port)
    {
        $this->socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
        if (!$this->socket || !@socket_connect($this->socket, $host, $port)) {
            $error = $this->getLastError();
            throw new CommunicationException($error['message'], $error['code']);
        }
    }