25 #include <QHostAddress> 101 const Hash& aFpOfNodeToTry ) ;
110 const Q_IPV6ADDR& aAddr2) ;
226 void sslErrors (
const QList<QSslError> & errors ) ;
240 void error(QTcpSocket::SocketError socketError);
305 void msleep(
int aMilliSeconds) ;
void error(QTcpSocket::SocketError socketError)
static const unsigned iMinutesBetweenBucketFill
Definition: connection.h:303
Node * iNodeOfConnectedPeer
Definition: connection.h:329
bool isInbound() const
Definition: connection.h:169
const int iPortToConnect
Definition: connection.h:333
unsigned long bytesIn() const
Definition: connection.h:186
unsigned long iBytesOut
Definition: connection.h:376
ConnectionState connectionState() const
Definition: connection.h:148
Node is a peer in network.
Definition: node.h:40
void setStageOfBucketFill(ProtocolItemType aStage)
Definition: connection.h:162
QSslSocket * iSocket
Definition: connection.h:313
Hash iFpOfNodeWeTrying
Definition: connection.h:347
void runForIncomingConnections()
quint32 iBytesExpectedInPacketBeingRead
Definition: connection.h:316
Hash iEndOfBucket
Definition: connection.h:370
bool forciblyCloseSocket()
unsigned iNumberOfPacketsReceived
Definition: connection.h:297
ConnectionState iConnectionState
Definition: connection.h:306
void encryptedBytesWritten(qint64 written)
const time_t iSocketOpenTime
Definition: connection.h:372
const Hash & fingerPrintOfNodeAttempted()
unsigned long iBytesIn
Definition: connection.h:374
ProtocolItemType iStageOfBucketFill
Definition: connection.h:361
int iInvocationsSinceLastByteReceived
Definition: connection.h:325
Hash is class that carries 160-bit digest.
Definition: hash.h:38
MController & iController
Definition: connection.h:339
const bool iSocketIsIncoming
Definition: connection.h:337
ConnectionObserver & iObserver
Definition: connection.h:308
Definition: connection.h:49
ConnectionState
Definition: connection.h:47
ProtocolItemType stageOfBucketFill() const
Definition: connection.h:156
QHostAddress iAddrToConnect
Definition: connection.h:331
Model & iModel
Definition: connection.h:314
ProtocolItemType
Definition: protocol.h:150
void blackListNetworkAddr(QHostAddress aAddr)
int iSleepBetweenSendOperations
Definition: connection.h:387
virtual bool dataReceived(const QByteArray &aData, Connection &aConnection)=0
Definition: connection.h:51
virtual void connectionReady(Connection *aBusinessEntity)=0
virtual void connectionClosed(Connection *aDeletee)=0
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:43
void msleep(int aMilliSeconds)
QHostAddress peerAddress() const
Definition: connection.h:50
M of the MVC pattern. Handles permanent storage.
Definition: model.h:48
Interface for receiving network traffic.
Definition: connection.h:59
time_t iTimeOfLastActivity
Definition: connection.h:296
unsigned long bytesOut() const
Definition: connection.h:192
Connection(int aSocketDescriptor, ConnectionObserver &aObserver, Model &aModel, MController &aController)
QList< SendQueueItem > iSendQueue
Definition: connection.h:283
static bool Ipv6AddressesEqual(const Q_IPV6ADDR &aAddr1, const Q_IPV6ADDR &aAddr2)
quint32 iTimeOfBucketFill
Definition: connection.h:365
QList< QByteArray * > iNextProtocolItemToSend
Definition: connection.h:293
time_t getOpenTime() const
Definition: connection.h:175
Node * node() const
Definition: connection.h:120
void setupSocketSignals()
void runForOutgoingConnections()
QByteArray * iBytesRead
Definition: connection.h:318
void socketError(QAbstractSocket::SocketError socketError)
Definition: connection.h:48
void setNode(Node *aNode)
Definition: connection.h:128
QHostAddress iPeerAddress
Definition: connection.h:378
Hash iPeerHash
Definition: connection.h:391
int iBytesPendingWrite
Definition: connection.h:383
Class that represents a network connection.
Definition: connection.h:43
void connectionAttemptFailed(const Hash &aNodeHash)
void sslErrors(const QList< QSslError > &errors)
bool isInPrivateAddrSpace() const
void checkForBucketFill()
bool iNeedsToRun
Definition: connection.h:295
const int iSocketDescriptor
Definition: connection.h:335