Commit 4349899e authored by lahiker42's avatar lahiker42

more rpc fun


git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@122 00440858-1255-0410-a3e6-75ea37f81c3a
parent ccdeb8b8
This diff is collapsed.
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
/* Protocol is: /* Protocol is:
* client issues request with header: * client issues request with header:
* service_index 32-bit little-endian * method_index 32-bit little-endian
* message_length 32-bit little-endian * message_length 32-bit little-endian
* request_id 32-bit any-endian * request_id 32-bit any-endian
* server responds with header: * server responds with header:
* service_index 32-bit little-endian * status_code 32-bit little-endian
* method_index 32-bit little-endian
* message_length 32-bit little-endian * message_length 32-bit little-endian
* request_id 32-bit any-endian * request_id 32-bit any-endian
*/ */
...@@ -22,9 +23,17 @@ typedef enum ...@@ -22,9 +23,17 @@ typedef enum
typedef enum typedef enum
{ {
PROTOBUF_C_ERROR_CODE_HOST_NOT_FOUND, PROTOBUF_C_ERROR_CODE_HOST_NOT_FOUND,
PROTOBUF_C_ERROR_CODE_CONNECTION_REFUSED PROTOBUF_C_ERROR_CODE_CONNECTION_REFUSED,
PROTOBUF_C_ERROR_CODE_CLIENT_TERMINATED,
PROTOBUF_C_ERROR_CODE_BAD_REQUEST,
} ProtobufC_RPC_Error_Code; } ProtobufC_RPC_Error_Code;
typedef enum
{
PROTOBUF_C_STATUS_CODE_SUCCESS,
PROTOBUF_C_STATUS_CODE_TOO_MANY_PENDING
} ProtobufC_RPC_Status_Code;
typedef void (*ProtobufC_RPC_Error_Func) (ProtobufC_RPC_Error_Code code, typedef void (*ProtobufC_RPC_Error_Func) (ProtobufC_RPC_Error_Code code,
const char *message, const char *message,
void *error_func_data); void *error_func_data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment