|
|
@ -136,12 +136,8 @@ public class LedClient
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly object Locker = new object();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static bool InnerSend(byte[] bytes)
|
|
|
|
private static bool InnerSend(byte[] bytes)
|
|
|
|
{
|
|
|
|
|
|
|
|
lock (Locker)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_socket?.Connected ?? false)
|
|
|
|
if (_socket?.Connected ?? false)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -160,7 +156,6 @@ public class LedClient
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
Connect();
|
|
|
|
Connect();
|
|
|
|
if (_socket?.Connected ?? false)
|
|
|
|
if (_socket?.Connected ?? false)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -175,7 +170,6 @@ public class LedClient
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static bool SendMsgByKey(string key)
|
|
|
|
public static bool SendMsgByKey(string key)
|
|
|
|
{
|
|
|
|
{
|
|
|
|