--- libaitrpc/inc/aitrpc.h 2013/11/22 13:41:33 1.21 +++ libaitrpc/inc/aitrpc.h 2013/12/15 16:09:53 1.21.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitrpc.h,v 1.21 2013/11/22 13:41:33 misho Exp $ +* $Id: aitrpc.h,v 1.21.2.1 2013/12/15 16:09:53 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -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); @@ -584,7 +584,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 +595,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 +632,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);