--- libaitrpc/inc/aitrpc.h 2013/11/22 13:41:14 1.20.8.1 +++ libaitrpc/inc/aitrpc.h 2014/01/28 14:05:43 1.23 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitrpc.h,v 1.20.8.1 2013/11/22 13:41:14 misho Exp $ +* $Id: aitrpc.h,v 1.23 2014/01/28 14:05:43 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +Copyright 2004 - 2014 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -270,7 +270,7 @@ void rpc_SetErr(int eno, char *estr, ...); * @sa = check client address, if you use udp protocol * @buf = buffer * @blen = buffer length - * return: -1 error or >-1 readed bytes into buffer + * return: -1 error, 0 EOF or or >0 readed bytes into buffer */ ssize_t rpc_Read(int sock, int type, int flags, sockaddr_t * __restrict sa, unsigned char * __restrict buf, size_t blen); @@ -283,7 +283,7 @@ ssize_t rpc_Read(int sock, int type, int flags, sockad * @sa = send to client address, if you use udp protocol * @buf = buffer * @blen = buffer length - * return: -1 error or >-1 written bytes into buffer + * return: -1 error, 0 EOF or >0 written bytes into buffer */ ssize_t rpc_Write(int sock, int type, int flags, sockaddr_t * __restrict sa, unsigned char * __restrict buf, size_t blen); @@ -570,6 +570,13 @@ int rpc_cli_getBLOB(rpc_cli_t * __restrict cli, ait_va rpc_cli_t *rpc_cli_openClient(unsigned char InstID, int netBuf, const char *csHost, unsigned short Port, int proto); /* + * rpc_cli_reconnectClient() - Reconnecting client to RPC server + * + * @cli = RPC Client session + * return: -1 error or 0 ok + */ +int rpc_cli_reconnectClient(rpc_cli_t * __restrict cli); +/* * rpc_cli_closeClient() - Close connection to RPC server and free resources * * @cli = RPC Client session @@ -584,7 +591,7 @@ void rpc_cli_closeClient(rpc_cli_t ** __restrict cli); * @sa = Server address * @pkt = RPC packet * @len = Length of packet - * return: -1 error or !=-1 sended bytes + * return: -1 error, 0 EOF or >0 sended bytes */ int rpc_pkt_Send(int sock, int type, sockaddr_t * __restrict sa, ait_val_t * __restrict pkt, int len); @@ -595,7 +602,7 @@ int rpc_pkt_Send(int sock, int type, sockaddr_t * __re * @type = Type of socket * @sa = Server address * @pkt = RPC packet - * return: -1 error or !=-1 sended bytes + * return: -1 error, 0 EOF or >0 received bytes */ int rpc_pkt_Receive(int sock, int type, sockaddr_t * __restrict sa, ait_val_t * __restrict pkt); @@ -632,7 +639,7 @@ int rpc_pkt_Replay(ait_val_t * __restrict pkt, rpc_ses * @tag = Function tag for execution * @in_vars = IN function argument array of values, may be NULL * @out_vars = OUT returned array of rpc values, if !=NULL must be free after use with ait_freeVars() - * return: -1 error or != -1 ok result + * return: -1 error, 0 ok result or 1 closed rpc connection */ int rpc_cli_execCall(rpc_cli_t *cli, int noreply, unsigned short tag, array_t * __restrict in_vars, array_t ** __restrict out_vars);