![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
#include <list>
#include <map>
#include <stdint.h>
#include <string>
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include "json/json_spirit_reader_template.h"
#include "json/json_spirit_utils.h"
#include "json/json_spirit_writer_template.h"
Go to the source code of this file.
Classes | |
class | SSLIOStreamDevice< Protocol > |
Functions | |
std::string | HTTPPost (const std::string &strMsg, const std::map< std::string, std::string > &mapRequestHeaders) |
std::string | HTTPReply (int nStatus, const std::string &strMsg, bool keepalive) |
bool | ReadHTTPRequestLine (std::basic_istream< char > &stream, int &proto, std::string &http_method, std::string &http_uri) |
int | ReadHTTPStatus (std::basic_istream< char > &stream, int &proto) |
int | ReadHTTPHeaders (std::basic_istream< char > &stream, std::map< std::string, std::string > &mapHeadersRet) |
int | ReadHTTPMessage (std::basic_istream< char > &stream, std::map< std::string, std::string > &mapHeadersRet, std::string &strMessageRet, int nProto) |
std::string | JSONRPCRequest (const std::string &strMethod, const json_spirit::Array ¶ms, const json_spirit::Value &id) |
json_spirit::Object | JSONRPCReplyObj (const json_spirit::Value &result, const json_spirit::Value &error, const json_spirit::Value &id) |
std::string | JSONRPCReply (const json_spirit::Value &result, const json_spirit::Value &error, const json_spirit::Value &id) |
json_spirit::Object | JSONRPCError (int code, const std::string &message) |
enum HTTPStatusCode |
Enumerator | |
---|---|
HTTP_OK | |
HTTP_BAD_REQUEST | |
HTTP_UNAUTHORIZED | |
HTTP_FORBIDDEN | |
HTTP_NOT_FOUND | |
HTTP_INTERNAL_SERVER_ERROR |
Definition at line 23 of file rpcprotocol.h.
enum RPCErrorCode |
Definition at line 34 of file rpcprotocol.h.
std::string HTTPPost | ( | const std::string & | strMsg, |
const std::map< std::string, std::string > & | mapRequestHeaders | ||
) |
Definition at line 35 of file rpcprotocol.cpp.
References FormatFullVersion(), and PAIRTYPE.
Referenced by CallRPC().
std::string HTTPReply | ( | int | nStatus, |
const std::string & | strMsg, | ||
bool | keepalive | ||
) |
Definition at line 57 of file rpcprotocol.cpp.
References FormatFullVersion(), HTTP_BAD_REQUEST, HTTP_FORBIDDEN, HTTP_INTERNAL_SERVER_ERROR, HTTP_NOT_FOUND, HTTP_OK, HTTP_UNAUTHORIZED, rfc1123Time(), and strprintf.
Referenced by ErrorReply(), RPCAcceptHandler(), and ServiceConnection().
json_spirit::Object JSONRPCError | ( | int | code, |
const std::string & | message | ||
) |
Definition at line 247 of file rpcprotocol.cpp.
References error().
Referenced by AccountFromValue(), addnode(), AmountFromValue(), backupwallet(), check_prop_valid(), createrawtransaction(), decoderawtransaction(), dumpprivkey(), dumpwallet(), encryptwallet(), EnsureWalletIsUnlocked(), CRPCTable::execute(), getaccount(), GetAccountAddress(), getactivecrowdsales_MP(), getaddednodeinfo(), getallbalancesforaddress_MP(), getallbalancesforid_MP(), getbalance_MP(), getblock(), getblocktemplate(), getcrowdsale_MP(), getgrants_MP(), getinfo_MP(), getnewaddress(), getproperty_MP(), getrawchangeaddress(), getrawtransaction(), getreceivedbyaddress(), getsto_MP(), gettrade_MP(), gettransaction(), gettransaction_MP(), importprivkey(), importwallet(), JSONRPCExecOne(), keypoolrefill(), listblocktransactions_MP(), listsinceblock(), listtransactions(), listtransactions_MP(), lockunspent(), movecmd(), JSONRequest::parse(), ParseHashV(), ParseHexV(), RPCTypeCheck(), send_MP(), sendfrom(), sendmany(), sendrawtransaction(), sendrawtx_MP(), sendtoaddress(), sendtoowners_MP(), ServiceConnection(), setaccount(), signmessage(), signrawtransaction(), submitblock(), verifymessage(), walletlock(), walletpassphrase(), and walletpassphrasechange().
std::string JSONRPCReply | ( | const json_spirit::Value & | result, |
const json_spirit::Value & | error, | ||
const json_spirit::Value & | id | ||
) |
json_spirit::Object JSONRPCReplyObj | ( | const json_spirit::Value & | result, |
const json_spirit::Value & | error, | ||
const json_spirit::Value & | id | ||
) |
std::string JSONRPCRequest | ( | const std::string & | strMethod, |
const json_spirit::Array & | params, | ||
const json_spirit::Value & | id | ||
) |
int ReadHTTPHeaders | ( | std::basic_istream< char > & | stream, |
std::map< std::string, std::string > & | mapHeadersRet | ||
) |
Definition at line 151 of file rpcprotocol.cpp.
References atoi().
Referenced by ReadHTTPMessage().
int ReadHTTPMessage | ( | std::basic_istream< char > & | stream, |
std::map< std::string, std::string > & | mapHeadersRet, | ||
std::string & | strMessageRet, | ||
int | nProto | ||
) |
Definition at line 177 of file rpcprotocol.cpp.
References HTTP_INTERNAL_SERVER_ERROR, HTTP_OK, MAX_SIZE, and ReadHTTPHeaders().
Referenced by CallRPC(), and ServiceConnection().
bool ReadHTTPRequestLine | ( | std::basic_istream< char > & | stream, |
int & | proto, | ||
std::string & | http_method, | ||
std::string & | http_uri | ||
) |
Definition at line 101 of file rpcprotocol.cpp.
References atoi().
Referenced by ServiceConnection().
Definition at line 136 of file rpcprotocol.cpp.
References atoi(), and HTTP_INTERNAL_SERVER_ERROR.
Referenced by CallRPC().