1#ifndef _KVI_IRCSOCKET_H_
2#define _KVI_IRCSOCKET_H_
115 QSocketNotifier * m_pWsn =
nullptr;
116 QSocketNotifier * m_pRsn =
nullptr;
119 QTimer * m_pTimeoutTimer =
nullptr;
120 unsigned int m_uReadBytes = 0;
121 unsigned int m_uSentBytes = 0;
122 unsigned int m_uSentPackets = 0;
127 struct timeval m_tAntiFloodLastMessageTime;
128 bool m_bInProcessData =
false;
129#ifdef COMPILE_SSL_SUPPORT
130 KviSSL * m_pSSL =
nullptr;
161 unsigned int id()
const {
return m_uId; }
169#ifdef COMPILE_SSL_SUPPORT
176#ifdef COMPILE_SSL_SUPPORT
181 KviSSL * getSSL()
const {
return m_pSSL; }
217#ifdef COMPILE_SSL_SUPPORT
246 bool getLocalHostIp(QString & szIp,
bool bIPv6);
253 void clearOutputQueue(
bool bPrivateMessagesOnly);
259 unsigned int outputQueueSize();
262#ifdef COMPILE_SSL_SUPPORT
267 void raiseSSLError();
273 void printSSLPeerCertificate();
279 void printSSLCipherInfo();
288 bool sendRawData(
const char * pcBuffer,
int iBufLen);
304 void connectionEstablished();
310 void connectedToProxy();
316 void connectedToIrcServer();
322 void proxyLoginHttp();
340 void proxyAuthUserPassV5();
346 void proxySendTargetDataV5();
353 void proxyHandleV5AuthReply(
unsigned char cReply);
360 void proxyHandleV5MethodReply(
unsigned char cReply);
367 void proxyHandleV5FinalReply(
unsigned char cReply);
374 void proxyHandleV4FinalReply(
unsigned char cReply);
382 void proxyHandleHttpFinalReply(
const char * pcBuffer,
int iBufLen);
399 void handleInvalidSocketRead(
int iReadLength);
405 virtual void reset();
427 bool queue_removeMessage();
433 void queue_removeAllMessages();
439 void queue_removePrivateMessages();
446 virtual void setState(SocketState state);
454 void outputSSLMessage(
const QString & szMsg);
461 void outputSSLError(
const QString & szMsg);
468 void outputProxyMessage(
const QString & szMsg);
475 void outputProxyError(
const QString & szMsg);
482 void outputSocketMessage(
const QString & szMsg);
489 void outputSocketWarning(
const QString & szMsg);
496 void outputSocketError(
const QString & szMsg);
502 void connectionTimedOut();
508 void writeNotifierFired(
int);
520 void readProxyData(
int);
526 void readHttpProxyErrorData(
int);
536 void flushSendQueue();
542 void doSSLHandshake(
int);
C++ Template based double linked pointer list class.
Definition KviConsoleWindow.h:74
Definition KviDataBuffer.h:31
Definition KviIrcConnectionTarget.h:36
An abstraction of a connection to an IRC server.
Definition KviIrcConnection.h:97
Middle stack class for IRC connection.
Definition KviIrcLink.h:56
The class which manages the irc servers.
Definition KviIrcServer.h:52
This class is the lowest level of the KVIrc networking stack.
Definition KviIrcSocket.h:75
KviConsoleWindow * console() const
Returns the console.
Definition KviIrcSocket.h:137
KviIrcLink * link() const
Returns the link.
Definition KviIrcSocket.h:143
KviConsoleWindow * m_pConsole
Definition KviIrcSocket.h:112
bool isConnected() const
Returns true if the socket is connected.
Definition KviIrcSocket.h:206
std::unique_ptr< QTimer > m_pFlushTimer
Definition KviIrcSocket.h:126
SocketState state() const
Returns the state of the socket.
Definition KviIrcSocket.h:149
int lastError() const
Returns the last error.
Definition KviIrcSocket.h:155
unsigned int m_uId
Definition KviIrcSocket.h:110
bool usingSSL() const
Returns true if the socket is a Secure Socket Layer (SSL)
Definition KviIrcSocket.h:167
unsigned int readBytes() const
Returns the number of bytes read.
Definition KviIrcSocket.h:187
unsigned int sentBytes() const
Returns the number of bytes sent.
Definition KviIrcSocket.h:193
unsigned int sentPackets() const
Returns the number of packets sent.
Definition KviIrcSocket.h:199
KviIrcLink * m_pLink
Definition KviIrcSocket.h:111
SocketState
Definition KviIrcSocket.h:95
@ ProxyFinalV5
Definition KviIrcSocket.h:102
@ Connected
Definition KviIrcSocket.h:100
@ ProxyFinalHttp
Definition KviIrcSocket.h:103
@ ProxyHttpError
Definition KviIrcSocket.h:99
@ Connecting
Definition KviIrcSocket.h:97
@ ProxySelectAuthMethodV5
Definition KviIrcSocket.h:104
@ Idle
Definition KviIrcSocket.h:96
@ ProxyUserPassV5
Definition KviIrcSocket.h:105
@ ProxyLogin
Definition KviIrcSocket.h:98
@ ProxyFinalV4
Definition KviIrcSocket.h:101
unsigned int id() const
Returns the id of the socket.
Definition KviIrcSocket.h:161
#define e
Definition detector.cpp:70
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127
#define KVI_INVALID_SOCKET
(defined(COMPILE_ON_WINDOWS) || (defined(COMPILE_ON_MINGW) && !defined(OS2))
Definition kvi_socket.h:75
int kvi_socket_t
Definition kvi_sockettype.h:40
Code
Contains all error codes.
Definition KviError.h:48
@ Success
Definition KviError.h:49
Definition KviIrcSocket.h:62
KviDataBuffer * pData
Definition KviIrcSocket.h:63
KviIrcSocketMsgEntry * next_ptr
Definition KviIrcSocket.h:64