Skip to content

Commit

Permalink
Provide read-only access to the ntc stream socket interface
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Foxhall <tfoxhall@bloomberg.net>
  • Loading branch information
hallfox committed Aug 22, 2024
1 parent b042ca1 commit 67788f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/groups/mwc/mwcio/mwcio_ntcchannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
// ---------------------
Expand Down
5 changes: 5 additions & 0 deletions src/groups/mwc/mwcio/mwcio_ntcchannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

// NTC
#include <ntcf_system.h>
#include <ntci_streamsocket.h>

// BDE
#include <bdlbb_blob.h>
Expand Down Expand Up @@ -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;
};

// =====================
Expand Down

0 comments on commit 67788f1

Please sign in to comment.