Beispiel #1
0
function sendChatroomMessage()
{
    // send a chatroom message
    $textGroupMessage = new TextChatroomPacket();
    $textGroupMessage->setFrom(G::$uid);
    $textGroupMessage->setGroupId(G::$chatroomId);
    $textGroupMessage->setText('everybody is ok?[ID:' . rand(1000, 9999) . ']');
    G::$client->send(serializePacket($textGroupMessage));
}
Beispiel #2
0
 public function sendChatroomMessage()
 {
     // send a chatroom message
     $textGroupMessage = new TextChatroomPacket();
     $textGroupMessage->setFrom($this->userId);
     $textGroupMessage->setGroupId($this->chatroomId);
     $textGroupMessage->setText('everybody is ok?汉语[ID:' . rand(1000, 9999) . ']');
     $this->send($this->serializePacket($textGroupMessage));
 }