Table of Contents

Name

SendRecAsync - async, send a TRANS record

Description

The first time SendRecAsync is called it xdr encapsulates a TRANS record and writes as much of the encapsulated record to the file descriptor as possible.

Each subsequent call attempts to write more of the record until tranmission is completed. The return code from SendRecAsync details the status of each attempt.

Use of SendRecAsync must be preceeded by a call to InitSendRecAsync in order to create the opaque data structure used by SendRecAsync(). This call must be made for each I/O channel to be used.

This function is part of libtcp.

Syntax

char *InitSendRecAsync(void);

int SendRecAsync(
   int s,

   TRANS *T,

   char *cname,

   char *info_pnt,

   int verbosity

   );

Arguments

s

socket file descriptor.

T

pointer to a TRANS record

cname

The name of the calling function

info_pnt

An opaque pointer to a data structure used by SendRecAsync for internal bookkeeping.

verbosity

This is supposed to be used to control emission of error messages from the function. It was added at the same time as a SendRec() was modified, however at this time (08-14-2008) it does nothing.

Returns

-1 - i/o error
0 - if no more work
1 - busy

See Also

libtcp(3tcp)

Manual page revision

$Id: SendRecAsync.3,v 1.3 2008/08/22 18:29:21 kitchen Exp $


Table of Contents