public void Close() { lock (socketLock) { if (!IsWork) { return; } IsWork = false; ConnectionData.ConnectionClosing(); } if (socket != null) { socket.Close(); } if (Disconnected != null) { Disconnected(this, new EventArgs()); } }
public void Close() { lock (socketLock) { if (!IsWork) { return; } IsWork = false; ConnectionData.ConnectionClosing(); } if (socket != null) { socket.Close(); } if (Disconnected != null) { Disconnected(this, new EventArgs()); } }