Go to the documentation of this file.
   58       void shutdown(std::string text = 
"unknown");
 
   85       int write(std::string data);
 
   86       void write(
char *buffer, 
int length);
 
   88       void output(std::stringstream &out);
 
  156       virtual void receiveData(
char *buffer, 
int bufferLength);
 
  164       bool readHangup = 
false;
 
  189       std::queue<std::string> fifo;
 
  
EPoll & ePoll
Definition: Socket.h:117
virtual void receiveData(char *buffer, int bufferLength)
Definition: Socket.cpp:110
virtual void onRegister()
Called before the socket has registered with the epoll processing.
Definition: Socket.cpp:53
bool shutDown
Definition: Socket.h:119
bool eventReceived(struct epoll_event event)
Parse epoll event and call specified callbacks.
Definition: Socket.cpp:61
int getDescriptor()
Get the descriptor for the socket.
Definition: Socket.cpp:40
int write(std::string data)
Definition: Socket.cpp:155
virtual void onRegistered()
Called after the socket has been registered with epoll processing.
Definition: Socket.cpp:55
Definition: Command.cpp:5
void setDescriptor(int descriptor)
Set the descriptor for the socket.
Definition: Socket.cpp:24
void setBufferSize(int length)
Definition: Socket.cpp:44
void shutdown(std::string text="unknown")
Definition: Socket.cpp:174
virtual void onDataReceived(std::string data)
Called when data is received from the socket.
Definition: Socket.cpp:102
~Socket()
Definition: Socket.cpp:14
bool needsToWrite()
Definition: Socket.cpp:169
int getBufferSize()
Definition: Socket.cpp:49
bool reset
Definition: Socket.h:113
virtual void onUnregister()
Definition: Socket.cpp:57
void output(std::stringstream &out)
Definition: Socket.cpp:165
virtual void onUnregistered()
Called when the socket has finished unregistering for the epoll processing.
Definition: Socket.cpp:59
Socket(EPoll &ePoll, std::string text="")
Definition: Socket.cpp:8