Exemplo n.º 1
0
    /// <summary>
    /// Sending data from a bitstream to a client using priorities, reliability, and a channel
    /// </summary>
    /// <param name="stream">Bitstream from which to send data</param>
    /// <param name="guid">Client guid to which data is sent</param>
    /// <param name="priority">Packet priority</param>
    /// <param name="reliability">Packet Reliability</param>
    /// <param name="channel">Channel number through which data will be sent (32 channels available)</param>
    public byte SendToClient(BitStream stream, ulong guid, PacketPriority priority = PacketPriority.IMMEDIATE_PRIORITY, PacketReliability reliability = PacketReliability.RELIABLE, byte channel = 0)
    {
        if (!peer.IsActive())
        {
            return(0);
        }

        return(peer.SendToClient(stream, guid, priority, reliability, channel));
    }