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