Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide read-only access to the ntc stream socket interface #402

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading