File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -521,6 +521,27 @@ int InitialConnectionContext::scheduleRead(bsl::ostream& errorDescription)
521521 return rc_SUCCESS;
522522}
523523
524+ void InitialConnectionContext::handleInitialConnection ()
525+ {
526+ if (!isIncoming ()) {
527+ // TODO: When we are ready to move on to the next step, we should
528+ // call `authenticationOutbound` here instead before calling
529+ // `negotiateOutbound`.
530+ handleEvent (0 ,
531+ bsl::string (),
532+ mqbnet::InitialConnectionEvent::e_OUTBOUND_NEGOTATION);
533+ }
534+ else {
535+ bmqu::MemOutStream errStream;
536+ const int rc = scheduleRead (errStream);
537+ if (rc != 0 ) {
538+ handleEvent (rc,
539+ errStream.str (),
540+ mqbnet::InitialConnectionEvent::e_ERROR);
541+ }
542+ }
543+ }
544+
524545void InitialConnectionContext::handleEvent (
525546 int statusCode,
526547 const bsl::string& errorDescription,
Original file line number Diff line number Diff line change @@ -383,6 +383,9 @@ class InitialConnectionContext
383383 // / `errorDescription` with details on failure.
384384 int scheduleRead (bsl::ostream& errorDescription);
385385
386+ // / Entrance to the initial connection process.
387+ void handleInitialConnection ();
388+
386389 // / Process a handshake event with the given `statusCode` and
387390 // / `errorDescription`. The `input` specifies the event type, and
388391 // / `message` contains any associated control message data.
You can’t perform that action at this time.
0 commit comments