Represents the server-side session associated with a RPC connection. More...
#include <RCFProto.hpp>
Public Member Functions | |
void | SetFailed (const std::string &reason) |
bool | IsCanceled () const |
tstring | getClientUsername () |
Returns the Windows username of the client, if a NTLM or Kerberos transport protocol is being used. | |
TransportProtocol | getTransportProtocol () |
Returns the transport protocol in use on this server session. | |
TransportType | getTransportType () |
Returns the transport type of this server session. | |
bool | getEnableCompression () |
Returns true if compression is enabled for this server session, and false otherwise. Compression is enabled by the client. | |
std::size_t | getConnectionDuration () const |
Returns the duration of the client connection, in milliseconds. | |
std::size_t | getRemoteCallCount () const |
Returns the number of remote calls executed on the server session so far. | |
boost::uint64_t | getTotalBytesReceived () const |
Returns the total number of bytes received by the server session so far. | |
boost::uint64_t | getTotalBytesSent () const |
Returns the total number of bytes sent from the server session so far. | |
void | NotifyOnCancel (google::protobuf::Closure *callback) |
NotifyOnCancel() must be called no more than once per request. More... | |
Represents the server-side session associated with a RPC connection.
bool RCF::RcfProtoSession::IsCanceled | ( | ) | const |
If true, indicates that the client canceled the RPC, so the server may as well give up on replying to it. The server should still call the final "done" callback.
void RCF::RcfProtoSession::NotifyOnCancel | ( | google::protobuf::Closure * | callback | ) |
NotifyOnCancel() must be called no more than once per request.
Asks that the given callback be called when the RPC is canceled. The callback will always be called exactly once. If the RPC completes without being canceled, the callback will be called after completion. If the RPC has already been canceled when NotifyOnCancel() is called, the callback will be called immediately.
void RCF::RcfProtoSession::SetFailed | ( | const std::string & | reason | ) |
Causes Failed() to return true on the client side. "reason" will be incorporated into the message returned by ErrorText(). If you find you need to return machine-readable information about failures, you should incorporate it into your response protocol buffer and should NOT call SetFailed().