#include <RemoteServer.h>
Public Types | |
| enum | ReturnCode { kSuccess, kFailure } |
| enum | ErrorCode { kNone, kTimeout } |
Public Methods | |
| RemoteServerReturn () | |
| The default constructor creates a new RemoteServerReturn object with a ReturnCode::kFailure and ErrorCode::kNone, indicating no successful response but no errors (ie, response pending), and a creation time. | |
| RemoteServerReturn (const RemoteServerReturn &sr) | |
| Copy constructor. | |
| ReturnCode | returnCode () const |
| |
| ErrorCode | errorCode () const |
| |
| timeval | elapsed () const |
| Calculate the time elapsed between creation and the last-recorded time. | |
| void | setReturnCode (ReturnCode ret) |
| Set whether the connection was successful or not. | |
| void | setErrorCode (ErrorCode err) |
| Set whether there was an error. | |
| void | updateTime (const struct timeval &t) |
| Set the last-recorded time to the specified time. | |
| void | reset () |
| Reset the RemoteServer return to its default state. | |
This is designed to be updated in successive invocations.
Definition at line 39 of file RemoteServer.h.
|
|
Definition at line 49 of file RemoteServer.h. Referenced by errorCode(), and setErrorCode(). |
|
|
Definition at line 42 of file RemoteServer.h. Referenced by returnCode(), and setReturnCode(). |
|
|
The default constructor creates a new RemoteServerReturn object with a ReturnCode::kFailure and ErrorCode::kNone, indicating no successful response but no errors (ie, response pending), and a creation time.
Definition at line 64 of file RemoteServer.h. |
|
|
Calculate the time elapsed between creation and the last-recorded time.
Definition at line 99 of file RemoteServer.h. References elapsed(). Referenced by CODEX_Quorum::RemoteServer::checkTimeout(), and elapsed(). |
|
|
Reset the RemoteServer return to its default state. The return code and error state are set back to their default values. The creation time and last-recorded time are set to the current time unless gettimeofday(2) fails, in which case they are both set to 0. Definition at line 132 of file RemoteServer.h. References kFailure, and kNone. Referenced by CODEX_Quorum::RemoteServer::contact(), and CODEX_Client::Client::contactServer(). |
1.2.18