Logo Search packages:      
Sourcecode: qnapi version File versions  Download package

QInterProcessChannel Class Reference

List of all members.


Detailed Description

A generic network-based communication channel for applications.

QInterProcessChannel offers communication facilities between several instances of the same application. It initializes itself so that the first created instance acts as a "server" which recieve messages from the others instances. This is particularly handy when creating a single-instance application which, for example, uses file association through a command line interface.

See also:
QSingleApplication

Definition at line 36 of file qinterprocesschannel.h.


Public Slots

void close ()
void close ()
 Closes the communication channel.
void reconnect ()
 Attemps to reconnect.
void sendMessage (const QByteArray &b)
void sendMessage (const QString &s)
void sendMessage ()
void sendMessage (const QByteArray &b)
 Send a message to server instance.
void sendMessage (const QString &s)
void sendMessage ()
void setMessageBuffer (const QString &s)
void setMessageBuffer (const QString &s)
 Sets a buffered message.

Signals

void connectionLost ()
void gotServerRole ()
void message (const QString &s)
void message (const QString &s)
void request (const QStringList &l)
void request (const QStringList &l)
void serverRoleChanged (bool y)

Public Member Functions

bool isServer () const
bool isServer () const
QString messageBuffer () const
QString messageBuffer () const
 QInterProcessChannel (QObject *p=0)
 QInterProcessChannel (QObject *p=0)
 Constructor.
virtual ~QInterProcessChannel ()
 Destructor.

Protected Member Functions

virtual void run ()
virtual void run ()

Private Slots

void check ()
void connection ()
 internal
void init ()
void init ()
void message (const QString &m, QManagedSocket *s)

Private Attributes

QString blockerMutexStr
QString globalMutexStr
QHostAddress m_addr
quint16 m_max
quint16 m_port
QString pipeName
QTcpServer * pServer
QTimer * pServerTimer
bool serverMode
QString sMsg
QString uniqPrefix

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index