X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2Fprotocol.cxx;h=be4883ecfd09db29b692ed75f6d37c8abf17eaf2;hb=7d3448294bc7486af3f4c1f0ff5c8493b03ffc90;hp=ea1e66678123bebd40ed28c96d3372a28acf8b5f;hpb=182fd42b4017fa54d680508c092ea1b216398a00;p=flightgear.git diff --git a/src/Network/protocol.cxx b/src/Network/protocol.cxx index ea1e66678..be4883ecf 100644 --- a/src/Network/protocol.cxx +++ b/src/Network/protocol.cxx @@ -95,3 +95,14 @@ bool FGProtocol::parse_message() { } +void FGProtocol::set_direction( const string& d ) { + if ( d == "in" ) { + dir = SG_IO_IN; + } else if ( d == "out" ) { + dir = SG_IO_OUT; + } else if ( d == "bi" ) { + dir = SG_IO_BI; + } else { + dir = SG_IO_NONE; + } +}