protected function getSocket($server)
    {
        if (isset($this->socket[$server])) {
            return $this->socket[$server];
        }

        $context = new ZMQContext();
        $socket = Socket::create($context, ZMQ::SOCKET_REQ, $this->logger);
        $socket->connect($server);

        $this->socket[$server] = $socket;

        return $socket;
    }
protected function getSocket($server)
    {
        if (isset($this->socket[$server])) {
            return $this->socket[$server];
        }

        $context = new ZMQContext();
        $socket = Socket::create($context, ZMQ::SOCKET_REQ, $this->logger);
        $socket->connect($server);

        $this->socket[$server] = $socket;

        return $socket;
    }
protected function getSocket ( $ server ) { if ( isset ( $ this -> socket [ $ server ] ) ) { return $ this -> socket [ $ server ] ; } $ context = new ZMQContext ( ) ; $ socket = Socket :: create ( $ context , ZMQ :: SOCKET_REQ , $ this -> logger ) ; $ socket -> connect ( $ server ) ; $ this -> socket [ $ server ] = $ socket ; return $ socket ; }
Returns a socket for the given server.

If the socket does not yet exist, it is created.

@param string $server

@return Socket
Returns a socket for the given server .