29 #ifndef AsyncComm_RESPONSECALLBACK_H
30 #define AsyncComm_RESPONSECALLBACK_H
90 memcpy(&addr, &
m_event->addr,
sizeof(addr));
112 #endif // AsyncComm_RESPONSECALLBACK_H
const InetAddr get_address() const
Gets the remote address of the requesting client.
virtual ~ResponseCallback()
Destructor.
void get_address(struct sockaddr_in &addr)
Gets the remote address of the requesting client.
std::string String
A String is simply a typedef to std::string.
virtual int response_ok()
Sends a a simple success response back to the client which is just the 4-byte error code Error::OK...
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Comm * m_comm
Comm pointer.
ResponseCallback(Comm *comm, EventPtr &event)
Constructor.
Encapsulate an internet address.
ResponseCallback()
Default constructor.
This class is used to generate and deliver standard responses back to a client.
Entry point to AsyncComm service.
virtual int error(int error, const String &msg)
Sends a standard error response back to the client.
A String class based on std::string.
EventPtr m_event
Smart pointer to event object.
EventPtr & event()
Get smart pointer to event object that triggered the request.