|
MoleQueue 0.9.0
|
#include <molequeue/servercore/connection.h>
Signals | |
| void | packetReceived (const MoleQueue::PacketType &packet, const MoleQueue::EndpointIdType &endpoint) |
| void | disconnected () |
Public Member Functions | |
| Connection (QObject *parentObject=0) | |
| virtual void | open ()=0 |
| virtual void | start ()=0 |
| virtual void | close ()=0 |
| virtual bool | isOpen ()=0 |
| virtual QString | connectionString () const =0 |
| virtual bool | send (const PacketType &packet, const EndpointIdType &endpoint)=0 |
| virtual void | flush ()=0 |
The Connection class is an interface defining the connection using to communicate between MoleQueue processes. Subclasses provide concrete implements for example based on local socket.
|
explicit |
Constructor.
| parentObject | parent |
|
pure virtual |
Open the connection
Implemented in LocalSocketConnection, and ZeroMqConnection.
|
pure virtual |
Start receiving messages on this connection
Implemented in LocalSocketConnection, and ZeroMqConnection.
|
pure virtual |
Close the connection. Once a conneciton is closed if can't reused.
Implemented in LocalSocketConnection, and ZeroMqConnection.
|
pure virtual |
Implemented in LocalSocketConnection, and ZeroMqConnection.
|
pure virtual |
Implemented in LocalSocketConnection, and ZeroMqConnection.
|
pure virtual |
Send the packet on the connection to endpoint.
Implemented in LocalSocketConnection, and ZeroMqConnection.
|
pure virtual |
Flush all pending messages to the other endpoint.
Implemented in LocalSocketConnection, and ZeroMqConnection.
|
signal |
Emitted when a new message has been received on this connection.
| msg | The message received. |
|
signal |
Emited when the connection is disconnected.