27 #include <rtt/Logger.hpp> 28 #include <rtt/Property.hpp> 29 #include <rtt/base/PropertyIntrospection.hpp> 30 #include <rtt/os/Mutex.hpp> 31 #include "TcpReporting.hpp" 32 #include "socketmarshaller.hpp" 33 #include "datasender.hpp" 44 SocketMarshaller::~SocketMarshaller()
46 closeAllConnections();
53 _connections.push_front( conn );
54 conn->Activity::start();
58 void SocketMarshaller::closeAllConnections()
61 while( !_connections.empty() )
63 removeConnection( _connections.front() );
67 void SocketMarshaller::flush()
73 _connections.remove( sender );
84 void SocketMarshaller::serialize(RTT::base::PropertyBase*)
87 Logger::log() << Logger::Error <<
"Unexpected call to SocketMarshaller::serialize" <<
91 void SocketMarshaller::serialize(
const PropertyBag &v)
95 for( std::list<OCL::TCP::Datasender*>::iterator it = _connections.begin();
96 it != _connections.end(); )
98 if( (*it)->isValid() )
105 removeConnection( torm );
111 void SocketMarshaller::shutdown()
113 closeAllConnections();
This class manages the connection with one single client.
A component which writes data reports to a tcp/ip socket.