#include <localsocketconnection.h>
Public Member Functions | |
LocalSocketConnection (QObject *parentObject, QLocalSocket *socket) | |
LocalSocketConnection (QObject *parentObject, const QString &connectionString) | |
~LocalSocketConnection () | |
void | open () |
void | start () |
void | close () |
bool | isOpen () |
QString | connectionString () const |
bool | send (const PacketType &packet, const EndpointIdType &endpoint) |
void | flush () |
![]() | |
Connection (QObject *parentObject=0) | |
Additional Inherited Members | |
![]() | |
void | packetReceived (const MoleQueue::PacketType &packet, const MoleQueue::EndpointIdType &endpoint) |
void | disconnected () |
Provides am implementation of using QLocalSockets. Each instance of the class wraps a QLocalSocket.
<molequeue/servervcore/localsocketconnection.h>
|
explicit |
Constructor used by to create a new connection based on an existing QLocalSocket.
parentObject | parent |
socket | The socket that this connection instance will operate on. |
|
explicit |
Constructor used by a client to connection to a server ( )
parentObject | parent |
connectionString | The "address" of server to connect to. |
Destructor.
|
virtual |
Opens the connection the server i.e. QLocalSocket::connectToServer(...)
Implements Connection.
|
virtual |
|
virtual |
Close the underlying socket. Once closed the connection can no longer be used to receive or send messages.
Implements Connection.
|
virtual |
Implements Connection.
|
virtual |
Implements Connection.
|
virtual |
Send the packet on the connection to endpoint.
Implements Connection.
|
virtual |
Flush all pending messages to the other endpoint.
Implements Connection.