5 #include <Poco/SharedPtr.h>
6 #include <Poco/Net/SocketAddress.h>
8 #include "gwmessage/GWAck.h"
9 #include "gwmessage/GWRequest.h"
10 #include "gwmessage/GWResponse.h"
21 typedef Poco::SharedPtr<GWSListener> Ptr;
24 const std::string host;
27 std::string toString()
const;
47 virtual void onRequest(
const GWRequest::Ptr request);
52 virtual void onResponse(
const GWResponse::Ptr response);
57 virtual void onAck(
const GWAck::Ptr ack);
63 virtual void onOther(
const GWMessage::Ptr other);
70 virtual void onTrySend(
const GWMessage::Ptr message);
78 virtual void onSent(
const GWMessage::Ptr message);
virtual void onRequest(const GWRequest::Ptr request)
When a request is received, this event is fired.
Definition: GWSListener.cpp:24
virtual void onTrySend(const GWMessage::Ptr message)
Fire when a message is about to be sent to the server. After the send is successful (no network failu...
Definition: GWSListener.cpp:40
virtual void onConnected(const Address &address)
Fired when the connection to the remote server is successfully created and it is possible to exchange...
Definition: GWSListener.cpp:16
virtual void onDisconnected(const Address &address)
Fired when the connection to the remote server is considered broken or when it is disconnected on a r...
Definition: GWSListener.cpp:20
Definition: GWSListener.h:23
virtual void onAck(const GWAck::Ptr ack)
When an ack is received, this event is fired.
Definition: GWSListener.cpp:32
virtual void onSent(const GWMessage::Ptr message)
Fire when a message is being sent to the server. There might be a delay between putting a messing int...
Definition: GWSListener.cpp:44
virtual void onOther(const GWMessage::Ptr other)
When a message other then request, response or ack is received, this event is fired.
Definition: GWSListener.cpp:36
virtual void onResponse(const GWResponse::Ptr response)
When a response is received, this event is fired.
Definition: GWSListener.cpp:28
GWSListener provides an interface for delivering of events and messages related to communication with...
Definition: GWSListener.h:19