#include <RemoteServer.h>
Public Types | |
| enum | ReturnCode { kSuccess, kFailure, kNumReturnCodes } |
| enum | ErrorCode { kNone, kTimeout, kNumErrorCodes } |
Public Member Functions | |
| 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 |
| Success or failure of the connection attempt. | |
| ErrorCode | errorCode () const |
| Whether or not there was an error. | |
| 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 42 of file RemoteServer.h.
|
|
Definition at line 52 of file RemoteServer.h. |
|
|
Definition at line 45 of file RemoteServer.h. |
|
|
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 67 of file RemoteServer.h. |
|
|
Calculate the time elapsed between creation and the last-recorded time.
Definition at line 102 of file RemoteServer.h. |
|
|
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 135 of file RemoteServer.h. References kFailure, and kNone. Referenced by CODEX_Client::Client::contactServer(). |
1.4.1