Move AcceptedConnection class to rpcserver.h.

Also, add parens to HTTPReply() to assist readability.
pull/196/head
Jeff Garzik 11 years ago
parent 854d013012
commit ed5769f536

@ -105,8 +105,8 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
strMsg.size(), strMsg.size(),
contentType, contentType,
FormatFullVersion(), FormatFullVersion(),
headersOnly ? "" : (headersOnly ? "" :
useInternalContent ? cStatus : strMsg.c_str()); (useInternalContent ? cStatus : strMsg.c_str())));
} }
bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto, bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,

@ -71,16 +71,6 @@ enum RPCErrorCode
RPC_WALLET_ALREADY_UNLOCKED = -17, // Wallet is already unlocked RPC_WALLET_ALREADY_UNLOCKED = -17, // Wallet is already unlocked
}; };
class AcceptedConnection
{
public:
virtual ~AcceptedConnection() {}
virtual std::iostream& stream() = 0;
virtual std::string peer_address_to_string() const = 0;
virtual void close() = 0;
};
// //
// IOStream device that speaks SSL but can also speak non-SSL // IOStream device that speaks SSL but can also speak non-SSL
// //

@ -21,6 +21,16 @@
class CBlockIndex; class CBlockIndex;
class CNetAddr; class CNetAddr;
class AcceptedConnection
{
public:
virtual ~AcceptedConnection() {}
virtual std::iostream& stream() = 0;
virtual std::string peer_address_to_string() const = 0;
virtual void close() = 0;
};
/* Start RPC threads */ /* Start RPC threads */
void StartRPCThreads(); void StartRPCThreads();
/* Alternative to StartRPCThreads for the GUI, when no server is /* Alternative to StartRPCThreads for the GUI, when no server is

Loading…
Cancel
Save