home *** CD-ROM | disk | FTP | other *** search
- .Na "dbsetidle"
- .Aa
- .Fu
- Call a user-supplied function when \*L is finished reading from \*S.
- .Ih "function, calling when \*L is finished reading from \*S"
- .Sy
- .Sf "void dbsetidle(dbproc, idlefunc)"
- .Sp "DBPROCESS" "*dbproc"
- .mc |
- .Sp "void" "(*idlefunc)()"
- .Co
- .mc
- .Bl
- This routine associates a user-supplied function with the
- specified \f2dbproc\f1.
- The user-supplied function will automatically be called when
- \*L is finished reading or waiting to read a packet of output from \*S.
- For example, an application may want to print a message
- whenever \*S has finished sending data to the host.
- .I "dbsetidle()"
- will cause the user-supplied function
- .I "idlefunc()"
- to be called in this case.
- .Bl
- Similarly,
- .I "dbsetbusy()"
- may also be used to associate a user-supplied function, \f2busyfunc()\f1, with a
- .I "dbproc."
- \f2busyfunc()\f1 will automatically be
- called whenever \*L is reading or waiting to read a packet of
- output from \*S.
- .Bl
- The server sends result data to the application in packets of 512 bytes.
- (The final packet in a set of results may be less than 512 bytes.)
- \*L calls \f2busyfunc()\f1 at the beginning of
- each packet and \f2idlefunc()\f1 at
- the end of each packet.
- If the output from the server spans multiple packets,
- \f2busyfunc()\f1 and \f2idlefunc()\f1 will be called
- multiple times.
- .Bl
- See the \f2dbsetbusy()\f1 manual page for an example of
- installing and defining \f2busyfunc()\f1 and \f2idlefunc()\f1.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .mc |
- .Pi idlefunc
- The user-supplied function that will be called by \*L whenever
- \*S has finished sending data to the host.
- \*L calls \f2idlefunc()\f1 with two parameters\(emthe return value
- from \f2busyfunc()\f1 (a pointer to a function that
- returns an integer) and a pointer to the
- DBPROCESS from the \f2dbsetidle()\f1 call.
- .sp
- \f2idlefunc()\f1 returns void.
- .in -.375i
- .Re
- .mc
- .br
- None.
- .Sa
- dbsetbusy
-