mqtt
This commit is contained in:
@@ -86,6 +86,16 @@ namespace Octopus.Simulator.Networks
|
||||
|
||||
public void Connect(string clientName, string host, int port)
|
||||
{
|
||||
if (client != null)
|
||||
{
|
||||
flag = true;
|
||||
clientTable.Remove(clientName);
|
||||
client.OnConnected -= ((client) => OnConnected(client, clientName));
|
||||
client.OnStateChanged -= OnStateChange;
|
||||
client.OnDisconnect -= OnDisconnected;
|
||||
client.OnError -= OnError;
|
||||
}
|
||||
|
||||
if (string.Equals(protocol, "wss"))
|
||||
{
|
||||
client = new MQTTClientBuilder()
|
||||
|
||||
Reference in New Issue
Block a user