本文整理匯總了PHP中raklib\Binary::writeLong方法的典型用法代碼示例。如果您正苦於以下問題:PHP Binary::writeLong方法的具體用法?PHP Binary::writeLong怎麽用?PHP Binary::writeLong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類raklib\Binary
的用法示例。
在下文中一共展示了Binary::writeLong方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: encode
public function encode()
{
parent::encode();
$this->buffer .= Binary::writeLong($this->clientID);
$this->buffer .= Binary::writeLong($this->sendPing);
$this->buffer .= \chr($this->useSecurity ? 1 : 0);
}
示例2: encode
public function encode()
{
parent::encode();
$this->buffer .= Binary::writeLong($this->clientID);
$this->buffer .= Binary::writeLong($this->session);
$this->buffer .= "";
}
示例3: encode
public function encode()
{
parent::encode();
$this->buffer .= Binary::writeLong($this->pingID);
$this->buffer .= Binary::writeLong($this->serverID);
$this->buffer .= RakLib::MAGIC;
$this->putString($this->serverName);
}
示例4: encode
public function encode()
{
parent::encode();
$this->buffer .= RakLib::MAGIC;
$this->putAddress($this->serverAddress, $this->serverPort, 4);
$this->buffer .= \pack("n", $this->mtuSize);
$this->buffer .= Binary::writeLong($this->clientID);
}
示例5: encode
public function encode()
{
parent::encode();
$this->buffer .= RakLib::MAGIC;
$this->buffer .= Binary::writeLong($this->serverID);
$this->buffer .= \chr(0);
//Server security
$this->buffer .= \pack("n", $this->mtuSize);
}
示例6: encode
public function encode()
{
parent::encode();
$this->buffer .= RakLib::MAGIC;
$this->buffer .= chr("4");
$this->buffer .= "3f57febe";
$this->buffer .= pack("n", $this->serverPort);
$this->buffer .= pack("n", $this->mtuSize);
$this->buffer .= Binary::writeLong($this->clientID);
}
示例7: encode
public function encode()
{
parent::encode();
$this->buffer .= RakLib::MAGIC;
$this->buffer .= Binary::writeLong($this->serverID);
$this->putAddress($this->clientAddress, $this->clientPort, 4);
$this->buffer .= pack("n", $this->mtuSize);
$this->buffer .= chr(0);
//server security
}
示例8: encode
public function encode()
{
parent::encode();
$this->putAddress($this->address, $this->port, 4);
$this->buffer .= pack("n", 0);
for ($i = 0; $i < 10; ++$i) {
$this->putAddress($this->systemAddresses[$i][0], $this->systemAddresses[$i][1], $this->systemAddresses[$i][2]);
}
$this->buffer .= Binary::writeLong($this->sendPing);
$this->buffer .= Binary::writeLong($this->sendPong);
}
示例9: encode
public function encode()
{
parent::encode();
$this->buffer .= "?Wþ";
//cookie
$this->buffer .= "Í";
//security flags
$this->buffer .= pack("n", $this->port);
$this->putDataArray(["õÿÿõ", "ÿÿÿÿ", "ÿÿÿÿ", "ÿÿÿÿ", "ÿÿÿÿ", "ÿÿÿÿ", "ÿÿÿÿ", "ÿÿÿÿ", "ÿÿÿÿ", "ÿÿÿÿ"]);
$this->buffer .= "";
$this->buffer .= Binary::writeLong($this->session);
$this->buffer .= Binary::writeLong($this->session2);
}
示例10: encode
public function encode()
{
parent::encode();
$this->buffer .= Binary::writeLong($this->pingID);
}
示例11: streamOpen
protected function streamOpen(Session $session)
{
$identifier = $session->getAddress() . ":" . $session->getPort();
$buffer = \chr(RakLib::PACKET_OPEN_SESSION) . \chr(\strlen($identifier)) . $identifier . \chr(\strlen($session->getAddress())) . $session->getAddress() . \pack("n", $session->getPort()) . Binary::writeLong($session->getID());
$this->server->pushThreadToMainPacket($buffer);
}
示例12: putLong
protected function putLong($v)
{
$this->buffer .= Binary::writeLong($v);
}