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_ctrlx()</b> - get or set xon/xoff handshake setting http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_ctrlx() - get or set XON/XOFF handshake setting

   nOldCtrl := tp_ctrlx(nPort, [nNewCtrl])

   nPort       Serial port number.
   nNewCtrl    New XON/XOFF control setting.

   Returns     Original XON/XOFF control setting.

   Gets or sets the XON/XOFF handshake setting.  This setting may be one
   of:

       0   No XON/XOFF.
       1   Send XON/XOFF to control input.
       2   Received XON/XOFF controls output.
       3   XON/XOFF on both input and output.

   If nNewCtrl is omitted, tp_ctrlx() just returns the current setting.
   If nNewCtrl is specified, it changes the setting and returns the
   original value.

   The default setting when a port is opened is 0.

   Note: XON/XOFF flow control is not usually the best choice for PC
   applications.  You may need it when talking to a mainframe or other
   computer that requires it.  It might be convenient when you are
   sending data that will be read by someone using a terminal, since it
   lets them type Ctrl-S and Ctrl-Q to stop and start the data stream.
   For other uses, especially talking to modems, hardware flow control
   using tp_ctrlrts() and tp_ctrlcts() is probably what you want.

   Example:

       tp_ctrlx(1, 3)      // Enable XON/XOFF on port 1.

See Also: tp_hshk() tp_lomark() tp_himark()

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