#ifndef __SERVER_H_ #define __SERVER_H_ #include #include #include #include #include #include #include #include #include "Buffers.h" #include "Buffer.h" #include "defines.h" enum modes { FRAME, FRAME_VALUES, CLIENTS }; using boost::asio::ip::udp; using namespace std; class Server : public sigc::trackable { public: Server(int _port); ~Server(); void launch_threads(); private: Glib::Mutex mutex_; void console(); void input(); void test(); char brtoc(unsigned char); int brtoi(unsigned char); void console_printframe(frame_t _frame); void console_printframe_values(frame_t _frame); void console_printstats(); void console_printclients(); void listen(); void mix(); void output(frame_t); int get_size(); void expire(); bool consoleinit; int console_input; long displaycounter, packetcounter; vector threads; vector buffers; vector endpoints; vector times; time_t currenttime; frame_t frame; int port; char mode; }; #endif