/home/bradarant/barant/ServerCore/TCPServerSocket.h
#ifndef __TCPServerSocket_h__
#define __TCPServerSocket_h__
#include "Socket.h"
#include "TCPSocket.h"
#include "Service.h"
#include "IPAddressList.h"
namespace core {
class TCPServerSocket : public TCPSocket, public Command {
public:
TCPServerSocket(EPoll &ePoll, Service &service, IPAddress address);
~TCPServerSocket();
Service &service;
IPAddressList *blackList;
IPAddressList *whiteList;
protected:
void onDataReceived(std::string data) override;
int processCommand(std::string command, Session *session, std::stringstream &data) override;
private:
Session * accept();
};
}
#endif
core::EPoll
Definition: EPoll.h:31
core::TCPServerSocket::service
Service & service
Definition: TCPServerSocket.h:50
core
Definition: Command.cpp:4
core::Session
Definition: Session.h:22
core::TCPServerSocket::onDataReceived
void onDataReceived(std::string data) override
Definition: TCPServerSocket.cpp:24
core::IPAddress
Definition: IPAddress.h:9
core::TCPServerSocket::whiteList
IPAddressList * whiteList
Definition: TCPServerSocket.h:64
core::TCPServerSocket::TCPServerSocket
TCPServerSocket(EPoll &ePoll, Service &service, IPAddress address)
Definition: TCPServerSocket.cpp:9
core::TCPServerSocket::blackList
IPAddressList * blackList
Definition: TCPServerSocket.h:58
core::Service
Definition: Service.h:20
core::Command
Definition: Command.h:18
core::TCPSocket
Definition: TCPSocket.h:20
core::TCPServerSocket::processCommand
int processCommand(std::string command, Session *session, std::stringstream &data) override
Definition: TCPServerSocket.cpp:50
core::TCPServerSocket
Definition: TCPServerSocket.h:23
core::IPAddressList
Definition: IPAddressList.h:9
core::TCPServerSocket::~TCPServerSocket
~TCPServerSocket()
Definition: TCPServerSocket.cpp:20