protected void OnStateChange(SocketStateChangeEventArgs e) { if (StateChange != null) { Invoke(StateChange, this, e); } }
protected void UpdateState(SocketState state) { if (State != state) { SocketStateChangeEventArgs e = new SocketStateChangeEventArgs(State, state); State = state; OnStateChange(e); } }