/** * Connects the TeamSpeak3_Transport_Abstract object and performs initial actions on the remote * server. * * @throws TeamSpeak3_Adapter_Exception * @return void */ public function syn() { $this->initTransport($this->options); $this->transport->setAdapter($this); \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Profiler::init(spl_object_hash($this)); \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit("filetransferConnected", $this); }
/** * Connects the TeamSpeak3_Transport_Abstract object and performs initial actions on the remote * server. * * @throws Exception * @return void */ protected function syn() { $this->initTransport($this->options); $this->transport->setAdapter($this); \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Profiler::init(spl_object_hash($this)); if (!$this->getTransport()->readLine()->startsWith(\ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::READY)) { throw new Exception("invalid reply from the server"); } \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit("serverqueryConnected", $this); }
/** * Connects the TeamSpeak3_Transport_Abstract object and performs initial actions on the remote * server. * * @throws TeamSpeak3_Adapter_Exception * @return void */ public function syn() { if (!isset($this->options["port"]) || empty($this->options["port"])) { $this->options["port"] = $this->default_port; } $this->initTransport($this->options); $this->transport->setAdapter($this); \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Profiler::init(spl_object_hash($this)); \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit("tsdnsConnected", $this); }
/** * Connects the TeamSpeak3_Transport_Abstract object and performs initial actions on the remote * server. * * @throws Update\Exception * @return void */ public function syn() { if (!isset($this->options["host"]) || empty($this->options["host"])) { $this->options["host"] = $this->default_host; } if (!isset($this->options["port"]) || empty($this->options["port"])) { $this->options["port"] = $this->default_port; } $this->initTransport($this->options, '\\ManiaLivePlugins\\Standard\\TeamSpeak\\TeamSpeak3\\Transport\\UDP'); $this->transport->setAdapter($this); \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Profiler::init(spl_object_hash($this)); $this->getTransport()->send(\ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String::fromHex(32)); if (!preg_match_all("/,?(\\d+),?/", $this->getTransport()->read(32), $matches) || !isset($matches[1])) { throw new Update\Exception("invalid reply from the server"); } $this->build_numbers = $matches[1]; \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit("updateConnected", $this); }
/** * Returns the profiler timer used for this connection adapter. * * @return TeamSpeak3_Helper_Profiler_Timer */ public function getProfiler() { return \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Profiler::get(spl_object_hash($this)); }