public void Disconnect() { state = State.Disconnected; if (OnStateChanged != null) { OnStateChanged(this, State.Disconnected); } _sendBytes = null; }
public void Connect(ISendBytes sb) { _sendBytes = sb; state = State.Unknown; if (OnStateChanged != null) { OnStateChanged(this, State.Unknown); } // Ping the die so we know its initial state Ping(); }