private function getSocket()
{
if (!$this->socket) {
$address = isset($_SERVER['SSL']) && $_SERVER['SSL'] == "1" ? 'ssl://127.0.0.1' : '127.0.0.1';
$this->socket = new HTTPSocket();
$this->socket->connect($address, 2222);
$this->socket->set_login('admin');
}
return $this->socket;
}