#ifndef SRC_IP_SERVER_H_
#define SRC_IP_SERVER_H_
#include <klog.h>


#define MAX_CLIENTS 5

class IPserver
{
	cKlog logger;
	int master_socket;
	fd_set readfds;
	int client_socket[MAX_CLIENTS];
	int mLastClient;

public:
	IPserver(int port, bool tcp = true);
	virtual ~IPserver();

	int waitClientData(uint8_t *buffer, int buffer_len);
	int transmitLastClient(uint8_t *buffer, int buffer_len);
	void stop();
};

#endif /* SRC_IP_SERVER_H_ */
