Esempio n. 1
0
        public bool Send(byte channelID, ref Packet packet)
        {
            ThrowIfNotCreated();

            packet.ThrowIfNotCreated();

            return(Native.enet_peer_send(nativePeer, channelID, packet.NativeData) == 0);
        }
Esempio n. 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));
        }
Esempio n. 3
0
        public int Send(byte channelID, ref Packet packet)
        {
            IsCreated();

            packet.IsCreated();

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

            return(Native.enet_peer_send(nativePeer, channelID, packet.NativeData) >= 0);
        }
Esempio n. 5
0
 public bool Send(byte channelID, Packet packet)
 {
     CheckCreated();
     packet.CheckCreated();
     return Native.enet_peer_send(_peer, channelID, packet.NativeData) >= 0;
 }
Esempio n. 6
0
 public bool Send(byte channelID, Packet packet)
 {
     return(Native.enet_peer_send(nativePeer, channelID, packet.NativeData) >= 0);
 }