Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_onempty()</b> - notify when output buffer empty http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_onempty() - notify when output buffer empty

   nNote := tp_onempty(nPort, [cFunction])

   nPort       Serial port number.
   cFunction   Name of notification function.

   Returns     Notification handle.

   Requests notification when the output buffer becomes empty.  If
   cFunction is omitted, deletes any onempty notification request for
   that port.

   Example:

       nFD := fopen("message.txt")
       SendBlock()

       procedure SendBlock
           local cBlock

           cBlock := freadstr(nFD, 1000)

           if len(cBlock) > 0
               tp_send(1, cBlock)
               tp_onempty(1, "SendBlock")
           else
               fclose(nFD)
           endif

           return

See Also: tp_noteoff() Notifications

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson