NClient Class Reference
Base class for client on network.
More...
#include "Network/Client/NClient.h"
List of all members.
Public Member Functions |
| NClient (Logger *pLogger, const QString &virtualMachineName, QObject *parent=0) |
virtual void | connectSocket (const QString &hostName, quint16 port)=0 |
| connect the socket to hostName using port
|
void | write (const QByteArray &data) |
| Writes data on the network.
|
const QString & | peerAddress () |
| Returns the address of the distant machine.
|
const QString & | virtualMachineName () |
| Returns the name of the machine linked to this socket.
|
Q_SIGNAL void | errorOccured (NClient *pClient) |
| Signal sent when an error occured.
|
Q_SIGNAL void | connected (NClient *pClient) |
| Signal sent when the client is connected.
|
Protected Member Functions |
Q_SLOT void | reportError (QAbstractSocket::SocketError errorId) |
| Report socket errors.
|
Q_SLOT void | connected () |
| Complete information at socket connection.
|
Protected Attributes |
Logger * | m_pLogger |
QAbstractSocket * | m_pSocket |
QString | m_peerAddress |
QString | m_virtualMachineName |
Detailed Description
Base class for client on network.
Constructor & Destructor Documentation
NClient::NClient |
( |
Logger * |
pLogger, |
|
|
const QString & |
virtualMachineName, |
|
|
QObject * |
parent = 0 | |
|
) |
| | |
- Parameters:
-
| pLogger | |
| virtualMachineName | the name of the machine for the server initiating the connection |
| parent | |
Member Function Documentation
void NClient::connected |
( |
NClient * |
pClient |
) |
|
Signal sent when the client is connected.
- Parameters:
-
| pClient | pointer to the client newly connected |
void NClient::connectSocket |
( |
const QString & |
hostName, |
|
|
quint16 |
port | |
|
) |
| | [pure virtual] |
connect the socket to hostName using port
- Parameters:
-
| hostName | the machine to connect |
| port | the port where to connect |
Implemented in SSLClient, and TCPClient.
void NClient::errorOccured |
( |
NClient * |
pClient |
) |
|
Signal sent when an error occured.
- Parameters:
-
| pClient | pointer to the client causing the error |
const QString & NClient::peerAddress |
( |
|
) |
[inline] |
Returns the address of the distant machine.
- Returns:
void NClient::reportError |
( |
QAbstractSocket::SocketError |
errorId |
) |
[protected] |
Report socket errors.
- Parameters:
-
const QString & NClient::virtualMachineName |
( |
|
) |
[inline] |
Returns the name of the machine linked to this socket.
- Returns:
void NClient::write |
( |
const QByteArray & |
data |
) |
|
Writes data on the network.
- Parameters:
-
Member Data Documentation
Address of the distant machine
Name of the distant machine (given by the config file from the NetworkManager)
The documentation for this class was generated from the following files:
- Sources/Network/Client/NClient.h
- Sources/Network/Client/NClient.cpp