#ifndef mrvServer_h #define mrvServer_h #include #include namespace mrv { class ViewerUI; class ParseCommands { public: ParseCommands( mrv::ViewerUI* v ); bool parse( const std::string& m ); virtual void send( const std::string s ) = 0; protected: mrv::ViewerUI* ui; }; struct ServerData { ServerData() : client( false ), port( 5001 ), host("localhost") { char buf[64]; sprintf( buf, "%d", port ); group = buf; } mrv::ViewerUI* ui; bool client; short port; std::string host; std::string group; }; void client_thread( const ServerData* ui ); void server_thread( const ServerData* ui ); } // namespace mrv #endif // mrvServer_h