• Модуль: xmpp
  • Путь к файлу: ~/bitrix/modules/xmpp/classes/server.php
  • Класс: CXMPPServer
  • Вызов: CXMPPServer::Start
protected function Start()
{
	$listen = COption::GetOptionString("xmpp", "listen_domain", "0.0.0.0");
	$errno = 0;
	$errstr = "";
	$this->sockServer = stream_socket_server("tcp://".$listen.":5222", $errno, $errstr);

	if (!$this->sockServer)
	{
		$this->WriteToLog("Create socket error: $errstr ($errno)", 10);
		return false;
	}

	$this->WriteToLog("Server started", 10);
	$this->socketsClientsStartIndex++;
	$this->arSockets[count($this->arSockets)] = $this->sockServer;
	return true;
}