#include <SRPC_impl.H>
Public Types | |
enum | item_code { ic_null = 0, ic_hello = 10, ic_start_call = 11, ic_end_call = 12, ic_end_ack = 13, ic_seq_start = 20, ic_seq_end = 21, ic_int16 = 28, ic_int16_array = 29, ic_int32 = 30, ic_int32_seq = 31, ic_chars = 32, ic_chars_seq = 33, ic_bytes = 34, ic_bytes_seq = 35, ic_text = 36, ic_socket = 40, ic_int64 = 41, ic_int32_array = 42, ic_int64_array = 43, ic_bool_true = 44, ic_bool_false = 45, ic_failure = 255 } |
enum | rpc_state { initial = 0, ready = 1, data_out = 2, seq_out = 3, data_in = 4, seq_in = 5, failed = 6 } |
enum | ops { op_start_call = 0, op_await_call = 1, op_send_int32 = 2, op_recv_int32 = 3, op_send_chars = 4, op_recv_chars = 5, op_recv_chars_here = 6, op_send_bytes = 7, op_recv_bytes = 8, op_recv_bytes_here = 9, op_send_text = 10, op_recv_text = 11, op_send_socket = 12, op_recv_socket = 13, op_send_int32_seq = 14, op_recv_int32_seq = 15, op_send_chars_seq = 16, op_recv_chars_seq = 17, op_send_bytes_seq = 18, op_recv_bytes_seq = 19, op_send_seq_start = 20, op_recv_seq_start = 21, op_send_seq_end = 22, op_recv_seq_end = 23, op_send_end = 24, op_recv_end = 25, op_send_failure = 26, op_send_int16 = 27, op_recv_int16 = 28, op_send_int16_array = 29, op_recv_int16_array = 30, op_send_int64 = 31, op_recv_int64 = 32, op_send_int32_array = 33, op_recv_int32_array = 34, op_send_int64_array = 35, op_recv_int64_array = 36, op_send_bool = 37, op_recv_bool = 38 } |
Public Member Functions | |
SRPC_impl (bool i_am_caller) | |
~SRPC_impl () throw (SRPC::failure) | |
void | send_item_code (item_code ic, bool flush=false) throw (TCP_sock::failure) |
item_code | read_item_code () throw (TCP_sock::failure, SRPC::failure) |
void | recv_item_code (item_code expected, bool *got_end=NULL) throw (TCP_sock::failure, SRPC::failure) |
item_code | recv_item_code (item_code expected1, item_code expected2, bool *got_end) throw (TCP_sock::failure, SRPC::failure) |
void | send_int16 (Basics::int16 i, bool flush=false) throw (TCP_sock::failure) |
Basics::int16 | recv_int16 () throw (TCP_sock::failure) |
void | send_int32 (Basics::int32 i, bool flush=false) throw (TCP_sock::failure) |
Basics::int32 | recv_int32 () throw (TCP_sock::failure) |
void | send_int64 (Basics::int64 i, bool flush=false) throw (TCP_sock::failure) |
Basics::int64 | recv_int64 () throw (TCP_sock::failure) |
void | send_bytes (const char *bs, int len, bool flush=false) throw (TCP_sock::failure) |
void | recv_bytes (char *bs, int len) throw (TCP_sock::failure, SRPC::failure) |
void | check_state (int op) throw (SRPC::failure) |
void | ensure_sending_state () throw () |
void | ensure_recving_state () throw () |
void | throw_failure (int reason, const Text &msg, bool local_only=false) throw (SRPC::failure) |
void | report_TCP_failure (TCP_sock::failure &tf) throw (SRPC::failure) |
Public Attributes | |
rpc_state | state |
SRPC::failure | f |
bool | is_caller |
bool | is_sender |
bool | version_sent |
bool | version_checked |
item_code | buffered_ic |
TCP_sock * | s |
SRPC_listener * | listener |
bool | use_read_timeout |
bool | use_read_timeout_between_calls |
unsigned int | read_timeout_secs |
Friends | |
class | SRPC |
|
Definition at line 60 of file SRPC_impl.H. |
|
Definition at line 102 of file SRPC_impl.H. |
|
Definition at line 92 of file SRPC_impl.H. |
|
Definition at line 59 of file SRPC_impl.C. |
|
Definition at line 70 of file SRPC_impl.C. References SRPC_listener::destroy(), SRPC::internal_trouble, s, and throw_failure(). |
|
Definition at line 214 of file SRPC_impl.C. References cc_pos, SRPC::protocol_violation, rs_pos, and state0_pos. |
|
Definition at line 237 of file SRPC_impl.C. |
|
Definition at line 226 of file SRPC_impl.C. |
|
Definition at line 353 of file SRPC_impl.C. References buffered_ic, ic_failure, ic_hello, ic_null, listener, NEW_PTRFREE_ARRAY, SRPC::protocol_violation, recv_bytes(), recv_int32(), s, SRPC_listener::sock, SRPC_VERSION, throw_failure(), version_checked, and TCP_sock::wait_for_connect(). |
|
Definition at line 259 of file SRPC_impl.C. References initial. Referenced by read_item_code(), recv_int16(), recv_int32(), and recv_int64(). |
|
Definition at line 297 of file SRPC_impl.C. References Basics::ntoh16(), and recv_bytes(). |
|
Definition at line 312 of file SRPC_impl.C. References Basics::ntoh32(), and recv_bytes(). Referenced by read_item_code(). |
|
Definition at line 327 of file SRPC_impl.C. References Basics::ntoh64(), and recv_bytes(). |
|
Definition at line 436 of file SRPC_impl.C. References ic_null, ic_seq_end, SRPC::protocol_violation, and seq_in. |
|
Definition at line 416 of file SRPC_impl.C. References ic_seq_end, SRPC::protocol_violation, and seq_in. |
|
Definition at line 101 of file SRPC_impl.C. References SRPC::convert_TCP_failure(), SRPC::failure::msg, and SRPC::failure::r. |
|
Definition at line 252 of file SRPC_impl.C. References FdCache::flush(). |
|
Definition at line 290 of file SRPC_impl.C. References FdCache::flush(), and Basics::hton16(). |
|
Definition at line 305 of file SRPC_impl.C. References FdCache::flush(), and Basics::hton32(). |
|
Definition at line 320 of file SRPC_impl.C. References FdCache::flush(), and Basics::hton64(). |
|
Definition at line 339 of file SRPC_impl.C. References FdCache::flush(), ic_hello, and SRPC_VERSION. |
|
Definition at line 83 of file SRPC_impl.C. References Text::chars(), failed, ic_failure, and Text::Length(). Referenced by read_item_code(), and ~SRPC_impl(). |
|
Definition at line 34 of file SRPC_impl.H. |
|
Definition at line 234 of file SRPC_impl.H. Referenced by read_item_code(). |
|
Definition at line 227 of file SRPC_impl.H. |
|
Definition at line 229 of file SRPC_impl.H. |
|
Definition at line 230 of file SRPC_impl.H. |
|
Definition at line 237 of file SRPC_impl.H. Referenced by read_item_code(). |
|
Definition at line 241 of file SRPC_impl.H. |
|
Definition at line 236 of file SRPC_impl.H. Referenced by read_item_code(), SRPC::socket(), and ~SRPC_impl(). |
|
Definition at line 226 of file SRPC_impl.H. Referenced by ensure_recving_state(), and ensure_sending_state(). |
|
Definition at line 239 of file SRPC_impl.H. Referenced by SRPC::disable_read_timeout(). |
|
Definition at line 240 of file SRPC_impl.H. |
|
Definition at line 232 of file SRPC_impl.H. Referenced by read_item_code(). |
|
Definition at line 231 of file SRPC_impl.H. |