コード例 #1
0
 private void Send(PacketBase packet)
 {
     if (Transport.IsClosed)
     {
         WriteToLog(Localization.UseRussian ? "Попытка отправить пакет в закрытом состоянии Transport" : "Tried to send packet while closed");
         throw new MqttClientException("Tried to send packet while closed");
     }
     Transport.Write(packet);
 }
コード例 #2
0
ファイル: MqttConnection.cs プロジェクト: kumajaya/OpenKPs
        private void Send(PacketBase packet)
        {
            if (Transport.IsClosed)
            {
                throw new MqttClientException("Tried to send packet while closed");
            }

            Transport.Write(packet);
            LastWrite = Environment.TickCount;
        }