diff --git a/src/groups/mwc/mwcio/mwcio_ntcchannel.cpp b/src/groups/mwc/mwcio/mwcio_ntcchannel.cpp index 4966539ae..28826882b 100644 --- a/src/groups/mwc/mwcio/mwcio_ntcchannel.cpp +++ b/src/groups/mwc/mwcio/mwcio_ntcchannel.cpp @@ -1407,6 +1407,12 @@ bslma::Allocator* NtcChannel::allocator() const return d_allocator_p; } +const ntci::StreamSocket& NtcChannel::streamSocket() const +{ + BSLS_ASSERT(d_streamSocket_sp); + return *d_streamSocket_sp; +} + // --------------------- // struct NtcChannelUtil // --------------------- diff --git a/src/groups/mwc/mwcio/mwcio_ntcchannel.h b/src/groups/mwc/mwcio/mwcio_ntcchannel.h index 60fd297fd..ffebe4657 100644 --- a/src/groups/mwc/mwcio/mwcio_ntcchannel.h +++ b/src/groups/mwc/mwcio/mwcio_ntcchannel.h @@ -37,6 +37,7 @@ // NTC #include +#include // BDE #include @@ -426,6 +427,10 @@ class NtcChannel : public mwcio::Channel, /// Return the allocator this object was created with. bslma::Allocator* allocator() const; + + /// Return the socket interface for this channel. This function is + /// undefined unless the channel has succesfully established a connection. + const ntci::StreamSocket& streamSocket() const; }; // =====================