当前位置: 首页>>代码示例>>PHP>>正文


PHP Binary::writeLong方法代码示例

本文整理汇总了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);
 }
开发者ID:xpyctum,项目名称:PocketMinePlusPlus,代码行数:7,代码来源:CLIENT_CONNECT_DataPacket__32bit.php

示例2: encode

 public function encode()
 {
     parent::encode();
     $this->buffer .= Binary::writeLong($this->clientID);
     $this->buffer .= Binary::writeLong($this->session);
     $this->buffer .= "";
 }
开发者ID:Hydreon,项目名称:PMSoft238,代码行数:7,代码来源:CLIENT_CONNECT_DataPacket.php

示例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);
 }
开发者ID:kakichi,项目名称:ClearSky,代码行数:8,代码来源:UNCONNECTED_PONG.php

示例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);
 }
开发者ID:kakichi,项目名称:ClearSky,代码行数:8,代码来源:OPEN_CONNECTION_REQUEST_2.php

示例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);
 }
开发者ID:TylerAndrew,项目名称:Steadfast2,代码行数:9,代码来源:OPEN_CONNECTION_REPLY_1.php

示例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);
 }
开发者ID:Hydreon,项目名称:PMSoft238,代码行数:10,代码来源:OPEN_CONNECTION_REQUEST_2.php

示例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
 }
开发者ID:ecoron,项目名称:MinionsLandPE,代码行数:10,代码来源:OPEN_CONNECTION_REPLY_2.php

示例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);
 }
开发者ID:TylerAndrew,项目名称:ClearSky,代码行数:11,代码来源:SERVER_HANDSHAKE_DataPacket.php

示例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);
 }
开发者ID:Hydreon,项目名称:PMSoft238,代码行数:13,代码来源:SERVER_HANDSHAKE_DataPacket.php

示例10: encode

 public function encode()
 {
     parent::encode();
     $this->buffer .= Binary::writeLong($this->pingID);
 }
开发者ID:TylerAndrew,项目名称:ClearSky,代码行数:5,代码来源:PONG_DataPacket.php

示例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);
 }
开发者ID:kakichi,项目名称:ClearSky,代码行数:6,代码来源:SessionManager.php

示例12: putLong

 protected function putLong($v)
 {
     $this->buffer .= Binary::writeLong($v);
 }
开发者ID:ClearSkyTeam,项目名称:ClearSky,代码行数:4,代码来源:Packet.php


注:本文中的raklib\Binary::writeLong方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。