Exemple #1
0
 public void Send(byte channelID, Packet packet)
 {
     NativeMethods.enet_peer_send(this.peerPtr, channelID, packet.PacketPtr);
     // enet_peer_send函数会自动删除packet,设置为0,防止Dispose或者析构函数再次删除
     packet.PacketPtr = IntPtr.Zero;
 }