/home/barant/Documents/Development/BMASockets/BMASIPServer.h
#ifndef __BMASIPServer_h__
#define __BMASIPServer_h__
#include "BMATCPServerSocket.h"
#include "BMASIPRequestHandler.h"
#include "BMASIPREGISTER.h"
#include "BMASIPINVITE.h"
class BMASIPServer : public BMATCPServerSocket {
public:
BMASIPServer(BMAEPoll &ePoll, std::string url, short int port, std::string commandName);
~BMASIPServer();
void registerHandler(std::string request, BMASIPRequestHandler &requestHandler);
void unregisterHandler(BMASIPRequestHandler &requestHandler);
BMASIPRequestHandler * getRequestHandler(std::string request);
protected:
BMASession * getSocketAccept() override;
private:
std::map<std::string, BMASIPRequestHandler *> requestHandlers;
};
#endif
BMATCPServerSocket
Definition: BMATCPServerSocket.h:20
BMASIPServer
Definition: BMASIPServer.h:9
BMASIPRequestHandler
Definition: BMASIPRequestHandler.h:7
BMAEPoll
Definition: BMAEPoll.h:29
BMASession
Definition: BMASession.h:18
BMASIPServer::getSocketAccept
BMASession * getSocketAccept() override
Definition: BMASIPServer.cpp:10