• 大小: 4.39MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-28
  • 语言: 其他
  • 标签: C#  MQTT  

资源简介

从git上下的paho.mqtt.m2mqtt-master,在此基础上做的测试窗体(连接,订阅,推送,重连)和json解析。引用时记得改为生成类库

资源截图

代码片段和文件信息

/*
Copyright (c) 2013 2014 Paolo Patierno

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
and Eclipse Distribution License v1.0 which accompany this distribution. 

The Eclipse Public License is available at 
   http://www.eclipse.org/legal/epl-v10.html
and the Eclipse Distribution License is available at 
   http://www.eclipse.org/org/documents/edl-v10.php.

Contributors:
   Paolo Patierno - initial API and implementation and/or initial documentation
*/

using System;
using System.Text;

namespace uPLibrary.Networking.M2Mqtt
{
    /// 
    /// Interface for channel under MQTT library
    /// 

    public interface IMqttNetworkChannel
    {
        /// 
        /// Data available on channel
        /// 

        bool DataAvailable { get; }

        /// 
        /// Receive data from the network channel
        /// 

        /// Data buffer for receiving data
        /// Number of bytes received
        int Receive(byte[] buffer);

        /// 
        /// Receive data from the network channel with a specified timeout
        /// 

        /// Data buffer for receiving data
        /// Timeout on receiving (in milliseconds)
        /// Number of bytes received
        int Receive(byte[] buffer int timeout);

        /// 
        /// Send data on the network channel to the broker
        /// 

        /// Data buffer to send
        /// Number of byte sent
        int Send(byte[] buffer);

        /// 
        /// Close the network channel
        /// 

        void Close();

        /// 
        /// Connect to remote server
        /// 

        void Connect();
        
        /// 
        /// Accept client connection
        /// 

        void Accept();
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2906  2016-10-21 01:32  paho.mqtt.m2mqtt-master\.gitignore

     文件       1605  2016-10-21 01:32  paho.mqtt.m2mqtt-master\about.html

     文件       3137  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Exceptions\MqttClientException.cs

     文件       1163  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Exceptions\MqttCommunicationException.cs

     文件        907  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Exceptions\MqttConnectionException.cs

     文件        767  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Exceptions\MqttTimeoutException.cs

     文件       2102  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\IMqttNetworkChannel.cs

     文件        739  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Internal\InternalEvent.cs

     文件       1324  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Internal\MsgInternalEvent.cs

     文件       1514  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Internal\MsgPublishedInternalEvent.cs

     文件       5488  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\M2Mqtt.NetCf35.csproj

     文件       9740  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgbase.cs

     文件       6929  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgConnack.cs

     文件      23824  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgConnect.cs

     文件       1295  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgConnectEventArgs.cs

     文件       3851  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgContext.cs

     文件       2890  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgDisconnect.cs

     文件       2886  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPingReq.cs

     文件       2926  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPingResp.cs

     文件       4240  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPuback.cs

     文件       4224  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPubcomp.cs

     文件      10031  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPublish.cs

     文件       2158  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPublishedEventArgs.cs

     文件       3024  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPublishEventArgs.cs

     文件       4210  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPubrec.cs

     文件       5038  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgPubrel.cs

     文件       5379  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgSuback.cs

     文件      10033  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgSubscribe.cs

     文件       1946  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgSubscribedEventArgs.cs

     文件       2328  2016-10-21 01:32  paho.mqtt.m2mqtt-master\Backup\M2Mqtt\Messages\MqttMsgSubscribeEventArgs.cs

............此处省略175个文件信息

评论

共有 条评论