2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00
This commit is contained in:
2021-05-14 18:24:34 +03:00
parent 0af14009be
commit 5bf258673d
48 changed files with 1032 additions and 383 deletions

View File

@ -165,7 +165,7 @@ namespace Esiur.Net.Sockets
{
ssl.BeginWrite(kv.Value, 0, kv.Value.Length, SendCallback, kv.Key);
}
catch (Exception ex)
catch //(Exception ex)
{
asyncSending = false;
try
@ -179,7 +179,7 @@ namespace Esiur.Net.Sockets
Close();
}
}
catch (Exception ex2)
catch //(Exception ex2)
{
//state = SocketState.Closed;// .Terminated;
Close();
@ -439,7 +439,7 @@ namespace Esiur.Net.Sockets
ssl.BeginRead(receiveBuffer, 0, receiveBuffer.Length, ReceiveCallback, this);
}
catch (Exception ex)
catch //(Exception ex)
{
if (state != SocketState.Closed && !sock.Connected)
{

View File

@ -126,7 +126,7 @@ namespace Esiur.Net.Sockets
return;
}
}
catch (Exception ex)
catch //(Exception ex)
{
if (socket.state != SocketState.Closed && !socket.sock.Connected)
{
@ -500,7 +500,7 @@ namespace Esiur.Net.Sockets
socket.Close();
}
}
catch (Exception ex2)
catch //(Exception ex2)
{
socket.Close();
//socket.state = SocketState.Closed;// .Terminated;

View File

@ -118,6 +118,7 @@ namespace Esiur.Net.Sockets
public void Send(byte[] message)
{
lock (sendLock)
{
if (held)
@ -131,9 +132,8 @@ namespace Esiur.Net.Sockets
pkt_send.Message = message;
if (pkt_send.Compose())
sock.Send(pkt_send.Data);
sock?.Send(pkt_send.Data);
}
}
@ -229,8 +229,6 @@ namespace Esiur.Net.Sockets
if (pkt_send.Compose())
sock.Send(pkt_send.Data);
}
}