Exemplo n.º 1
0
 public function send(RCONPacket $dataPacket)
 {
     if (!$this->channel->isConnected()) {
         $this->channel->connect($this->remoteSocket[0], $this->remoteSocket[1]);
     }
     $this->buffer = ByteBuffer::wrap($dataPacket->getBytes());
     $this->channel->write($this->buffer);
 }
Exemplo n.º 2
0
 /**
  * @param byte $headerData
  * @param byte[] $contentData
  * @param bool $splitPacket
  */
 public function __construct($headerData, $contentData = null)
 {
     $this->headerData = $headerData;
     $this->contentData = ByteBuffer::wrap($contentData);
 }
Exemplo n.º 3
0
 /**
  *
  */
 public function send(SteamPacket $dataPacket)
 {
     trigger_error("Sending packet of type \"" . get_class($dataPacket) . "\"...");
     $this->buffer = ByteBuffer::wrap($dataPacket->__toString());
     $this->channel->write($this->buffer);
 }