Skip to content

Commit

Permalink
Move AcceptedConnection class to rpcserver.h.
Browse files Browse the repository at this point in the history
Also, add parens to HTTPReply() to assist readability.
  • Loading branch information
Jeff Garzik committed Jun 27, 2014
1 parent 854d013 commit ed5769f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/rpcprotocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
strMsg.size(),
contentType,
FormatFullVersion(),
headersOnly ? "" :
useInternalContent ? cStatus : strMsg.c_str());
(headersOnly ? "" :
(useInternalContent ? cStatus : strMsg.c_str())));
}

bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
Expand Down
10 changes: 0 additions & 10 deletions src/rpcprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,6 @@ enum RPCErrorCode
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
//
Expand Down
10 changes: 10 additions & 0 deletions src/rpcserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
class CBlockIndex;
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 */
void StartRPCThreads();
/* Alternative to StartRPCThreads for the GUI, when no server is
Expand Down

0 comments on commit ed5769f

Please sign in to comment.