/** * Request to server a socket, if okay server returns with the url and port opened. * * @return mixed * * @throws CreateSocketException */ protected function serverSocketRequest() { $base = function_exists('lzf_compress') ? self::REQUEST_SOCKET_LZF : self::REQUEST_SOCKET_NON_LZF; $url = sprintf("%s%s/%d", $this->clientApiConfig->getEndpoint(), $base, $this->clientApiConfig->getProjectId()); $data = array('key' => $this->clientApiConfig->getKey(), 'secret' => $this->clientApiConfig->getSecret()); return $this->postClient->call($url, $data); }