home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
C
/
ISC365
/
XONOFF.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-06
|
632b
|
40 lines
// This module was written by LeucroTTa inc. (AKA OLAOR).
#include "xonoff.h";
// update flow_enabled.
//
void XONOFF::flow_check(void)
{
// flow_enabled= TRUE;
}
XONOFF::XONOFF()
{
flow_enabled= TRUE;
}
// returns whether current char should be discarded.
BOOLEAN XONOFF::flow_set(BYTE in_byte)
{
if (in_byte== XON) {
if (!flow_enabled) {
flow_enabled= TRUE;
do_send();
return TRUE;
}
flow_enabled= TRUE;
}
else if (in_byte== XOFF) {
flow_enabled= FALSE;
return TRUE;
}
return FALSE;
}