RequestSender constructor

RequestSender(
  1. PitelUA ua,
  2. OutgoingRequest request,
  3. EventManager eventHandlers
)

Implementation

RequestSender(
    PitelUA ua, OutgoingRequest request, EventManager eventHandlers) {
  _ua = ua;
  _eventHandlers = eventHandlers;
  _method = request.method;
  _request = request;
  _auth = null;
  _challenged = false;
  _staled = false;

  // If ua is in closing process or even closed just allow sending Bye and ACK.
  if (ua.status == uac.C.STATUS_USER_CLOSED &&
      (_method != SipMethod.BYE || _method != SipMethod.ACK)) {
    _eventHandlers.emit(EventOnTransportError());
  }
}