def __init__(self, connection_type: ConnectionType) -> None:
    self.client = (connection_type is ConnectionType.CLIENT)
    self._state = ConnectionState.CONNECTING
    if self.client:
        self._h11_connection = h11.Connection(h11.CLIENT)
    else:
        self._h11_connection = h11.Connection(h11.SERVER)
    self._connection: Optional[Connection] = None
    self._events: Deque[Event] = deque()
    self._initiating_request: Optional[Request] = None
    self._nonce: Optional[bytes] = None
def __init__(self, connection_type: ConnectionType) -> None:
    self.client = (connection_type is ConnectionType.CLIENT)
    self._state = ConnectionState.CONNECTING
    if self.client:
        self._h11_connection = h11.Connection(h11.CLIENT)
    else:
        self._h11_connection = h11.Connection(h11.SERVER)
    self._connection: Optional[Connection] = None
    self._events: Deque[Event] = deque()
    self._initiating_request: Optional[Request] = None
    self._nonce: Optional[bytes] = None