mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-30 07:55:51 +00:00
Pass path for RPC subscribe by url.
This commit is contained in:
@@ -865,6 +865,8 @@ bool responseRPC(
|
|||||||
// Build the request.
|
// Build the request.
|
||||||
void requestRPC(const std::string& strMethod, const Json::Value& jvParams, const std::map<std::string, std::string>& mHeaders, const std::string& strPath, boost::asio::streambuf& sb, const std::string& strHost)
|
void requestRPC(const std::string& strMethod, const Json::Value& jvParams, const std::map<std::string, std::string>& mHeaders, const std::string& strPath, boost::asio::streambuf& sb, const std::string& strHost)
|
||||||
{
|
{
|
||||||
|
cLog(lsDEBUG) << "requestRPC: strPath='" << strPath << "'";
|
||||||
|
|
||||||
std::ostream osRequest(&sb);
|
std::ostream osRequest(&sb);
|
||||||
|
|
||||||
osRequest <<
|
osRequest <<
|
||||||
@@ -913,7 +915,7 @@ void callRPC(
|
|||||||
strMethod,
|
strMethod,
|
||||||
jvParams,
|
jvParams,
|
||||||
mapRequestHeaders,
|
mapRequestHeaders,
|
||||||
"/", _1, _2),
|
strPath, _1, _2),
|
||||||
RPC_REPLY_MAX_BYTES,
|
RPC_REPLY_MAX_BYTES,
|
||||||
boost::posix_time::seconds(RPC_NOTIFY_SECONDS),
|
boost::posix_time::seconds(RPC_NOTIFY_SECONDS),
|
||||||
boost::bind(&responseRPC, callbackFuncP, _1, _2, _3));
|
boost::bind(&responseRPC, callbackFuncP, _1, _2, _3));
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ RPCSub::RPCSub(const std::string& strUrl, const std::string& strUsername, const
|
|||||||
|
|
||||||
if (mPort < 0)
|
if (mPort < 0)
|
||||||
mPort = mSSL ? 443 : 80;
|
mPort = mSSL ? 443 : 80;
|
||||||
|
|
||||||
|
cLog(lsINFO) << boost::str(boost::format("callRPC sub: ip='%s' port=%d ssl=%d path='%s'")
|
||||||
|
% mIp
|
||||||
|
% mPort
|
||||||
|
% mSSL
|
||||||
|
% mPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX Could probably create a bunch of send jobs in a single get of the lock.
|
// XXX Could probably create a bunch of send jobs in a single get of the lock.
|
||||||
|
|||||||
Reference in New Issue
Block a user