RealmPacketOut packet = new RealmPacketOut(OpCode.SMSG_HELLO); packet.WriteUInt32((uint)sessionId); packet.WriteString(clientVersion); realmServer.SendPacket(packet);
RealmPacketOut packet = new RealmPacketOut(OpCode.CMSG_MOVE); packet.WriteFloat(x); packet.WriteFloat(y); packet.WriteFloat(z); packet.WriteFloat(o); realmServer.SendPacket(packet);This example shows how to create a packet with the OpCode CMSG_MOVE, and write four float values (x, y, z, and o) to the packet before sending it to the server. This could be used to send a player's movement data to the server. The package library used in these examples is Realm.Net.