mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 22:01:02 +08:00
Add set_error_handler methods
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@208 00440858-1255-0410-a3e6-75ea37f81c3a
This commit is contained in:
parent
b791a2c61b
commit
af30e97e8e
@ -777,6 +777,17 @@ protobuf_c_rpc_client_set_autoreconnect_period (ProtobufC_RPC_Client *client,
|
||||
client->autoreconnect = 1;
|
||||
client->autoreconnect_millis = millis;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
protobuf_c_rpc_client_set_error_handler (ProtobufC_RPC_Client *client,
|
||||
ProtobufC_RPC_Error_Func func,
|
||||
void *func_data)
|
||||
{
|
||||
client->error_handler = func;
|
||||
client->error_handler_data = func_data;
|
||||
}
|
||||
|
||||
void
|
||||
protobuf_c_rpc_client_disable_autoreconnect (ProtobufC_RPC_Client *client)
|
||||
{
|
||||
@ -1343,3 +1354,12 @@ protobuf_c_rpc_server_destroy (ProtobufC_RPC_Server *server,
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
protobuf_c_rpc_server_set_error_handler (ProtobufC_RPC_Server *server,
|
||||
ProtobufC_RPC_Error_Func func,
|
||||
void *error_func_data)
|
||||
{
|
||||
server->error_handler = func;
|
||||
server->error_handler_data = error_func_data;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user