Exemplo n.º 1
0
 /**
  * Method to send a packet to the rcon server.
  * @param Packet $packet The packet which will be send to the rcon server.
  * @return bool The state if the packet was successfully send.
  * @since 1.0.0
  */
 public function sendPacket(Packet $packet)
 {
     $this->packet = $packet;
     $request = $this->packet->getRequest();
     return socket_write($this->socket, $request, strlen($request)) === false ? false : true;
 }