#ifndef __UDPServerSocket_h__ #define __UDPServerSocket_h__ #include "Socket.h" #include "UDPSocket.h" #include "Command.h" namespace core { /// /// UDPSocket /// /// Manage a socket connection as a UDP server type. Connections to the socket are processed through /// the session list functionality. A list of sessions is maintained in a vector object. /// class UDPServerSocket : public UDPSocket, public Command { public: UDPServerSocket(EPoll &ePoll, std::string url, short int port, std::string commandName); ~UDPServerSocket(); protected: //--------------------------------------------------------------- // Override the virtual dataReceived since for the server these // are requests to accept the new connection socket. //--------------------------------------------------------------- void onDataReceived(std::string data) override; int processCommand(std::string request, std::stringstream &data); //------------------------------------------------------------------------------------ // The retrieved socket connections are placed into the client vector list. //------------------------------------------------------------------------------------ std::vector sessions; private: }; } #endif