Skip to content

Commit 65b3857

Browse files
committed
Declare send and subscribe on protocol_rpc<>.
1 parent 14bb540 commit 65b3857

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

include/bitcoin/network/protocols/protocol_rpc.hpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,18 @@ class protocol_rpc
3939
protected:
4040
inline protocol_rpc(const session::ptr& session,
4141
const channel::ptr& channel, const options_t&) NOEXCEPT
42-
: protocol(session, channel)
42+
: protocol(session, channel),
43+
channel_(std::dynamic_pointer_cast<channel_t>(channel))
4344
{
4445
}
46+
47+
DECLARE_SEND()
48+
DECLARE_SUBSCRIBE_CHANNEL()
49+
50+
private:
51+
// This is mostly thread safe, and used in a thread safe manner.
52+
// pause/resume/paused/attach not invoked, setters limited to handshake.
53+
const channel_t::ptr channel_;
4554
};
4655

4756
} // namespace network

0 commit comments

Comments
 (0)