public override void Dispose() { if (State != DeviceState.NotConnected) { DisConnect(); } //socket.TryDispose(); client.TryDispose(); }