Added support for occam's flush (sending 255) and moved some of the unreachable flush commands in the C++ support headers

This commit is contained in:
Neil Brown 2008-03-25 11:37:02 +00:00
parent 2107960442
commit 0eadbd0b11
2 changed files with 11 additions and 3 deletions

View File

@ -93,12 +93,12 @@ protected:
in >> c;
out << c;
}
out.flush();
}
catch (csp::PoisonException& e)
{
in.poison();
}
out.flush();
}
public:
inline StreamWriter(std::ostream& _out,const csp::Chanin<uint8_t>& _in)
@ -225,14 +225,21 @@ protected:
{
tockSendableArrayOfBytes aob(1,&c);
in >> aob;
out << c;
if (c == 255)
{
out.flush();
}
else
{
out << c;
}
}
out.flush();
}
catch (csp::PoisonException& e)
{
in.poison();
}
out.flush();
}
public:
inline StreamWriterByteArray(std::ostream& _out,const csp::Chanin<tockSendableArrayOfBytes>& _in)

View File

@ -5,4 +5,5 @@ PROC echo(CHAN BYTE in, out)
in ? c
out ! c
out ! c
out ! 255
: