示例#1
0
        public bool Send(byte channelID, ref Packet packet)
        {
            ThrowIfNotCreated();

            packet.ThrowIfNotCreated();

            return(Native.enet_peer_send(nativePeer, channelID, packet.NativeData) == 0);
        }
示例#2
0
        // Added by Coburn. This version returns either 0 if the send was successful,
        // or the ENET return code if not. Sometimes a bool is not enough to determine
        // the root cause of the issue.
        public int SendAndReturnStatusCode(byte channelID, ref Packet packet)
        {
            CheckCreated();

            packet.CheckCreated();

            return(Native.enet_peer_send(nativePeer, channelID, packet.NativeData));
        }
示例#3
0
        public int Send(byte channelID, ref Packet packet)
        {
            IsCreated();

            packet.IsCreated();

            return(Native.enet_peer_send(nativePeer, channelID, packet.NativeData));
        }
示例#4
0
        public bool Send(byte channelID, ref Packet packet)
        {
            CheckCreated();

            return(Native.enet_peer_send(nativePeer, channelID, packet.NativeData) >= 0);
        }
示例#5
0
 public bool Send(byte channelID, Packet packet)
 {
     CheckCreated();
     packet.CheckCreated();
     return Native.enet_peer_send(_peer, channelID, packet.NativeData) >= 0;
 }
示例#6
0
文件: ENet.cs 项目: bmjoy/ENet-CSharp
 public bool Send(byte channelID, Packet packet)
 {
     return(Native.enet_peer_send(nativePeer, channelID, packet.NativeData) >= 0);
 }