CEngineSharp_Client.Net.NetManager.SendMessage C# (CSharp) Method

SendMessage() public method

public SendMessage ( NetOutgoingMessage message, NetDeliveryMethod method, ChannelTypes channelType ) : bool
message Lidgren.Network.NetOutgoingMessage
method NetDeliveryMethod
channelType ChannelTypes
return bool
        public bool SendMessage(NetOutgoingMessage message, NetDeliveryMethod method, ChannelTypes channelType)
        {
            if (_netClient.ConnectionStatus == NetConnectionStatus.Connected)
            {
                _netClient.SendMessage(message, method, (int)channelType);
                return true;
            }
            else
            {
                _packetCache.Add(new Tuple<NetOutgoingMessage, NetDeliveryMethod, ChannelTypes>(message, method, channelType));
                return false;
            }
        }