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:
lahiker42 2010-03-17 18:29:07 +00:00
parent b791a2c61b
commit af30e97e8e

View File

@ -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;
}