libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

ixp_pending_write.3 (1898B)


      1 .TH "IXP_PENDING_WRITE" 3 "2010 Jun" "libixp Manual"
      2 
      3 .SH NAME
      4 .P
      5 ixp_pending_write, ixp_pending_pushfid, ixp_pending_clunk, ixp_pending_flush, ixp_pending_respond, IxpPending
      6 
      7 .SH SYNOPSIS
      8 .nf
      9   #include <ixp_srvutil.h>
     10   
     11   void ixp_pending_write(IxpPending *pending, char *dat, long ndat);
     12   
     13   void ixp_pending_pushfid(IxpPending *pending, IxpFid *fid);
     14   
     15   bool ixp_pending_clunk(Ixp9Req *req);
     16   
     17   void ixp_pending_flush(Ixp9Req *req);
     18   
     19   void ixp_pending_respond(Ixp9Req *req);
     20   
     21   typedef struct IxpPending       IxpPending;
     22   struct IxpPending {
     23           /* Private members */
     24           ...
     25   }
     26 .fi
     27 
     28 .SH DESCRIPTION
     29 .P
     30 These functions aid in writing virtual files used for
     31 broadcasting events or writing data when it becomes
     32 available. When a file to be used with these functions is
     33 opened, ixp_pending_pushfid should be called with its
     34 \fBIxpFid(3)\fR as an argument. This sets the IxpFid's IpendingR
     35 member to true.  Thereafter, for each file with its
     36 IpendingR member set, ixp_pending_respond should be called
     37 for each TRead request, ixp_pending_clunk for each TClunk
     38 request, and ixp_pending_flush for each TFlush request.
     39 
     40 .P
     41 ixp_pending_write queues the data in IdatR of length IndatR
     42 to be written to each currently pending fid in IpendingR. If
     43 there is a read request pending for a given fid, the data is
     44 written immediately. Otherwise, it is written the next time
     45 ixp_pending_respond is called. Likewise, if there is data
     46 queued when ixp_pending_respond is called, it is written
     47 immediately, otherwise the request is queued.
     48 
     49 .P
     50 The IxpPending data structure is opaque and should be
     51 initialized zeroed before using these functions for the first
     52 time.
     53 
     54 .SH RETURN VALUE
     55 .P
     56 ixp_pending_clunk returns true if IpendingR has any
     57 more pending IxpFids.
     58 
     59 
     60 .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net)
     61 .\" cmdline: txt2tags -o- ixp_pending_write.man3
     62