KVIrc
4.9.2
DeveloperAPIs
|
This class is the lowest level of the KVIrc networking stack. More...
#include <KviIrcSocket.h>
Public Types | |
enum | SocketState { Idle, Connecting, ProxyLogin, ProxyHttpError, Connected, ProxyFinalV4, ProxyFinalV5, ProxyFinalHttp, ProxySelectAuthMethodV5, ProxyUserPassV5, SSLHandshake } |
Public Member Functions | |
void | abort () |
Aborts the connection. More... | |
void | clearOutputQueue (bool bPrivateMessagesOnly) |
Clears the output queue. More... | |
KviConsoleWindow * | console () |
Returns the console. More... | |
bool | getLocalHostIp (QString &szIp, bool bIPv6) |
Gets the localhost IP. More... | |
unsigned int | id () |
Returns the id of the socket. More... | |
bool | isConnected () |
Returns true if the socket is connected. More... | |
KviIrcSocket (KviIrcLink *pLink) | |
Constructs the IRC socket object. More... | |
int | lastError () |
Returns the last error. More... | |
KviIrcLink * | link () |
Returns the link. More... | |
unsigned int | outputQueueSize () |
Returns the current size of the output queue. More... | |
unsigned int | readBytes () |
Returns the number of bytes read. More... | |
bool | sendPacket (KviDataBuffer *pData) |
Returns true if the packet is sent to the socket. More... | |
unsigned int | sentBytes () |
Returns the number of bytes sent. More... | |
unsigned int | sentPackets () |
Returns the number of packets sent. More... | |
KviError::Code | startConnection (KviIrcServer *pServer, KviProxy *pProxy=0, const char *pcBindAddress=0) |
Starts the connection. More... | |
SocketState | state () |
Returns the state of the socket. More... | |
bool | usingSSL () |
Returns true if the socket is a Secure Socket Layer (SSL) More... | |
~KviIrcSocket () | |
Destroys the IRC socket object. More... | |
Protected Slots | |
void | connectionTimedOut () |
Called when the connection timeouts. More... | |
void | doSSLHandshake (int) |
Starts the SSL handshake. More... | |
void | flushSendQueue () |
Attempts to send as much as possible to the server. More... | |
void | readData (int) |
Called when the read notifier is enabled. More... | |
void | readHttpProxyErrorData (int) |
Called when the proxy read notifier encounters an error. More... | |
void | readProxyData (int) |
Called when the proxy read notifier is enabled. More... | |
void | writeNotifierFired (int) |
Called when the write notifier is enabled. More... | |
Protected Member Functions | |
void | connectedToIrcServer () |
Called when the connection to the irc server has been established. More... | |
void | connectedToProxy () |
Called when the connection to the proxy has been established. More... | |
void | connectionEstablished () |
Called when the connection has been established. More... | |
void | free_msgEntry (KviIrcSocketMsgEntry *e) |
Removes the message entry. More... | |
void | handleInvalidSocketRead (int iReadLength) |
Checks if the socket error is a transient error. More... | |
void | linkUp () |
Connection established. Sets the link up. More... | |
void | proxyAuthUserPassV5 () |
Starts the negotiation of user/pass for the proxy. More... | |
void | proxyHandleHttpFinalReply (const char *pcBuffer, int iBufLen) |
Gets the final HTTP reply and handles it. More... | |
void | proxyHandleV4FinalReply (unsigned char cReply) |
Gets the final SOCKSv4 reply and handles it. More... | |
void | proxyHandleV5AuthReply (unsigned char cReply) |
Gets the authentication reply and handles it. More... | |
void | proxyHandleV5FinalReply (unsigned char cReply) |
Gets the final SOCKSv5 reply and handles it. More... | |
void | proxyHandleV5MethodReply (unsigned char cReply) |
Gets the method selection reply and handles it. More... | |
void | proxyLoginHttp () |
Called to login to an HTTP proxy. More... | |
void | proxyLoginV4 () |
Called to login to a SOCKSv4 proxy. More... | |
void | proxyLoginV5 () |
Called to login to a SOCKSv5 proxy. More... | |
void | proxySendTargetDataV5 () |
Sends the request details. More... | |
virtual void | queue_insertMessage (KviIrcSocketMsgEntry *pMsg) |
Appends a KviIrcSocketMsgEntry to the tail of the message queue. More... | |
void | queue_removeAllMessages () |
Removes all messages from the queue. More... | |
bool | queue_removeMessage () |
Removes a message from the head of the queue. More... | |
void | queue_removePrivateMessages () |
Removes private messages from the queue. More... | |
void | raiseError (KviError::Code eError) |
Raises an error. More... | |
virtual void | reset () |
Resets the connection. More... | |
bool | sendRawData (const char *pcBuffer, int iBufLen) |
Sends raw data to the socket. More... | |
virtual void | setState (SocketState state) |
Sets the state of the socket. More... | |
Protected Attributes | |
bool | m_bInProcessData |
KviError::Code | m_eLastError |
KviConsoleWindow * | m_pConsole |
QTimer * | m_pFlushTimer |
KviIrcServer * | m_pIrcServer |
KviIrcLink * | m_pLink |
KviProxy * | m_pProxy |
QSocketNotifier * | m_pRsn |
KviIrcSocketMsgEntry * | m_pSendQueueHead |
KviIrcSocketMsgEntry * | m_pSendQueueTail |
QTimer * | m_pTimeoutTimer |
QSocketNotifier * | m_pWsn |
kvi_socket_t | m_sock |
SocketState | m_state |
struct timeval | m_tAntiFloodLastMessageTime |
unsigned int | m_uId |
unsigned int | m_uReadBytes |
unsigned int | m_uSentBytes |
unsigned int | m_uSentPackets |
Private Member Functions | |
void | outputProxyError (const QString &szMsg) |
Outputs a proxy error. More... | |
void | outputProxyMessage (const QString &szMsg) |
Outputs a proxy message. More... | |
void | outputSocketError (const QString &szMsg) |
Outputs a socket error. More... | |
void | outputSocketMessage (const QString &szMsg) |
Outputs a socket message. More... | |
void | outputSocketWarning (const QString &szMsg) |
Outputs a socket warning. More... | |
void | outputSSLError (const QString &szMsg) |
Outputs a SSL error. More... | |
void | outputSSLMessage (const QString &szMsg) |
Outputs a SSL message. More... | |
This class is the lowest level of the KVIrc networking stack.
It sends and receives raw data packets from the underlying system socket. It should output only verbose "progress" messages.
KviIrcSocket::KviIrcSocket | ( | KviIrcLink * | pLink | ) |
Constructs the IRC socket object.
pLink | The middle networking stack class |
References connect(), KviIrcLink::console(), flushSendQueue(), g_uNextIrcLinkId, Idle, KVI_INVALID_SOCKET, KVI_OPTION_UINT, KviOption_uintSocketQueueFlushTimeout, m_bInProcessData, m_eLastError, m_pConsole, m_pFlushTimer, m_pIrcServer, m_pLink, m_pProxy, m_pRsn, m_pSendQueueHead, m_pSendQueueTail, m_pTimeoutTimer, m_pWsn, m_sock, m_state, m_tAntiFloodLastMessageTime, m_uId, m_uReadBytes, m_uSentBytes, m_uSentPackets, and KviError::Success.
KviIrcSocket::~KviIrcSocket | ( | ) |
Destroys the IRC socket object.
References m_pFlushTimer, and reset().
void KviIrcSocket::abort | ( | ) |
Aborts the connection.
References Connected, flushSendQueue(), m_state, KviError::OperationAborted, raiseError(), and reset().
Referenced by KviIrcLink::abort().
void KviIrcSocket::clearOutputQueue | ( | bool | bPrivateMessagesOnly | ) |
Clears the output queue.
bPrivateMessagesOnly | Whether to clear only private messages |
References queue_removeAllMessages(), and queue_removePrivateMessages().
Referenced by KviIrcLink::clearOutputQueue().
|
protected |
Called when the connection to the irc server has been established.
References linkUp(), m_pIrcServer, and KviIrcServer::useSSL().
Referenced by connectionEstablished(), proxyHandleHttpFinalReply(), proxyHandleV4FinalReply(), and proxyHandleV5FinalReply().
|
protected |
Called when the connection to the proxy has been established.
References connect(), KviProxy::Http, m_pProxy, m_pRsn, m_sock, KviProxy::protocol(), ProxyLogin, proxyLoginHttp(), proxyLoginV4(), proxyLoginV5(), readProxyData(), setState(), and KviProxy::Socks5.
Referenced by connectionEstablished().
|
protected |
Called when the connection has been established.
If it's a proxy we need to perform the login operations, otherwise we're connected to the irc server
References connectedToIrcServer(), connectedToProxy(), KVI_INVALID_SOCKET, m_pProxy, and m_sock.
Referenced by writeNotifierFired().
|
protectedslot |
Called when the connection timeouts.
References KviError::ConnectionTimedOut, raiseError(), and reset().
Referenced by startConnection().
|
inline |
Returns the console.
|
protectedslot |
Starts the SSL handshake.
References connect(), KVI_ASSERT, kvi_socket_error(), kvi_socket_recoverableError(), linkUp(), m_pRsn, m_pWsn, m_sock, raiseError(), KviError::RemoteEndClosedConnection, reset(), KviError::SSLError, KviError::Success, KviError::translateSystemError(), and KviError::UnknownError.
|
protectedslot |
Attempts to send as much as possible to the server.
If fails (happens only on really lagged servers) calls itself with a QTimer shot after KVI_OPTION_UINT(KviOption_uintSocketQueueFlushTimeout) ms to retry again...
References __tr2qs, _OUTPUT_VERBOSE, KviDataBuffer::data(), KVI_ASSERT, kvi_gettimeofday(), KVI_OPTION_BOOL, KVI_OPTION_UINT, kvi_socket_error(), kvi_socket_send(), KviOption_boolLimitOutgoingTraffic, KviOption_uintOutgoingTrafficLimitUSeconds, KviOption_uintSocketQueueFlushTimeout, m_pFlushTimer, m_pSendQueueHead, m_sock, m_state, m_tAntiFloodLastMessageTime, m_uSentBytes, m_uSentPackets, outputSocketWarning(), _KviIrcSocketMsgEntry::pData, queue_removeMessage(), raiseError(), KviError::RemoteEndClosedConnection, KviDataBuffer::remove(), reset(), KviDataBuffer::size(), KviError::SSLError, and KviError::translateSystemError().
Referenced by abort(), KviIrcSocket(), readData(), sendPacket(), and sendRawData().
|
protected |
Removes the message entry.
e | The entry |
References KviMemory::free(), and _KviIrcSocketMsgEntry::pData.
Referenced by queue_removePrivateMessages().
bool KviIrcSocket::getLocalHostIp | ( | QString & | szIp, |
bool | bIPv6 | ||
) |
Gets the localhost IP.
szIp | The source IP address |
bIPv6 | Whether to use IPv6 sockets |
References KviNetUtils::binaryIpToStringIp(), Connected, kvi_socket_getsockname(), m_sock, m_state, and KviRuntimeInfo::name().
Referenced by dcc_kvs_get_listen_ip_address().
|
protected |
Checks if the socket error is a transient error.
If it is not a transient error it resets the socket and fires the appropriate event. Otherwise it does nothing.
iReadLength | The number of bytes read |
References KVI_ASSERT, kvi_socket_error(), raiseError(), KviError::RemoteEndClosedConnection, reset(), and KviError::translateSystemError().
Referenced by readData(), readHttpProxyErrorData(), and readProxyData().
|
inline |
Returns the id of the socket.
|
inline |
Returns true if the socket is connected.
|
inline |
|
inline |
Returns the link.
|
protected |
Connection established. Sets the link up.
References connect(), Connected, KVI_INVALID_SOCKET, m_pRsn, m_pWsn, m_sock, readData(), and setState().
Referenced by connectedToIrcServer(), and doSSLHandshake().
|
private |
Outputs a proxy error.
szMsg | The message :) |
References __tr2qs, KVI_OUT_SOCKETERROR, m_pConsole, and KviWindow::output().
Referenced by proxyHandleHttpFinalReply().
|
private |
Outputs a proxy message.
szMsg | The message :) |
References __tr2qs, KVI_OUT_SOCKETMESSAGE, m_pConsole, and KviWindow::output().
Referenced by proxyHandleHttpFinalReply(), proxyHandleV4FinalReply(), proxyHandleV5AuthReply(), proxyHandleV5FinalReply(), proxyHandleV5MethodReply(), proxyLoginHttp(), proxyLoginV4(), proxyLoginV5(), and readHttpProxyErrorData().
unsigned int KviIrcSocket::outputQueueSize | ( | ) |
Returns the current size of the output queue.
References m_pSendQueueTail, and _KviIrcSocketMsgEntry::next_ptr.
Referenced by KviIrcLink::outputQueueSize().
|
private |
Outputs a socket error.
szMsg | The message :) |
References __tr2qs, KVI_OUT_SOCKETERROR, m_pConsole, and KviWindow::output().
Referenced by raiseError().
|
private |
Outputs a socket message.
szMsg | The message :) |
References __tr2qs, KVI_OUT_SOCKETMESSAGE, m_pConsole, and KviWindow::output().
Referenced by raiseError(), and startConnection().
|
private |
Outputs a socket warning.
szMsg | The message :) |
References __tr2qs, KVI_OUT_SOCKETWARNING, m_pConsole, and KviWindow::output().
Referenced by flushSendQueue(), and startConnection().
|
private |
Outputs a SSL error.
szMsg | The message :) |
References __tr2qs, KVI_OUT_SSL, m_pConsole, and KviWindow::output().
|
private |
Outputs a SSL message.
szMsg | The message :) |
References __tr2qs, KVI_OUT_SSL, m_pConsole, and KviWindow::output().
|
protected |
Starts the negotiation of user/pass for the proxy.
References m_pProxy, KviMemory::move(), KviProxy::pass(), KviProxy::passLen(), ProxyUserPassV5, sendRawData(), setState(), KviProxy::user(), and KviProxy::userLen().
Referenced by proxyHandleV5MethodReply().
|
protected |
Gets the final HTTP reply and handles it.
pcBuffer | The buffer containing the proxy reply |
iBufLen | Size of the buffer containing the proxy reply |
References __tr2qs, _OUTPUT_VERBOSE, connect(), connectedToIrcServer(), KviCString::cutFromFirst(), KviWindow::decodeText(), KviCString::findFirstIdx(), kvi_strEqualCIN(), m_pConsole, m_pRsn, m_pWsn, m_sock, outputProxyError(), outputProxyMessage(), ProxyHttpError, KviCString::ptr(), readHttpProxyErrorData(), setState(), and KviCString::trim().
Referenced by readProxyData().
|
protected |
Gets the final SOCKSv4 reply and handles it.
cReply | The proxy reply |
References __tr2qs, _OUTPUT_VERBOSE, connectedToIrcServer(), outputProxyMessage(), KviError::ProxyReply91RequestFailed, KviError::ProxyReply92IdentFailed, KviError::ProxyReply93IdentNotMatching, raiseError(), reset(), and KviError::UnrecognizedProxyReply.
Referenced by readProxyData().
|
protected |
Gets the authentication reply and handles it.
cReply | The proxy reply |
References __tr2qs, _OUTPUT_VERBOSE, outputProxyMessage(), KviError::ProxyAuthFailed, proxySendTargetDataV5(), raiseError(), and reset().
Referenced by readProxyData().
|
protected |
Gets the final SOCKSv5 reply and handles it.
cReply | The proxy reply |
References __tr2qs, _OUTPUT_VERBOSE, connectedToIrcServer(), outputProxyMessage(), KviError::ProxyReply01GeneralSOCKSFailure, KviError::ProxyReply02ConnectionNotAllowed, KviError::ProxyReply03NetworkUnreachable, KviError::ProxyReply04HostUnreachable, KviError::ProxyReply05ConnectionRefused, KviError::ProxyReply06TTLExpired, KviError::ProxyReply07CommandNotSupported, KviError::ProxyReply08AddressTypeNotSupported, KviError::ProxyReply09InvalidAddress, raiseError(), reset(), and KviError::UnrecognizedProxyReply.
Referenced by readProxyData().
|
protected |
Gets the method selection reply and handles it.
cReply | The proxy reply |
References __tr2qs, _OUTPUT_VERBOSE, outputProxyMessage(), proxyAuthUserPassV5(), KviError::ProxyNoAcceptableAuthMethod, proxySendTargetDataV5(), raiseError(), reset(), and KviError::UnrecognizedProxyReply.
Referenced by readProxyData().
|
protected |
Called to login to an HTTP proxy.
References __tr2qs, _OUTPUT_VERBOSE, KviCString::append(), KviCString::bufferToBase64(), KviCString::Format, KviProxy::hasUser(), KviIrcServer::hostName(), KviCString::len(), m_pIrcServer, m_pProxy, outputProxyMessage(), KviProxy::pass(), KviIrcServer::port(), ProxyFinalHttp, KviCString::ptr(), sendRawData(), setState(), and KviProxy::user().
Referenced by connectedToProxy().
|
protected |
Called to login to a SOCKSv4 proxy.
References __tr2qs, _OUTPUT_VERBOSE, KviCString::append(), KviCString::hasData(), KviProxy::hasPass(), KviIrcServer::ip(), KviCString::len(), m_pIrcServer, m_pProxy, KviMemory::move(), KviProxy::normalizeUserAndPass(), outputProxyMessage(), KviProxy::pass(), KviIrcServer::port(), ProxyFinalV4, KviCString::ptr(), sendRawData(), setState(), KviNetUtils::stringIpToBinaryIp(), and KviProxy::user().
Referenced by connectedToProxy().
|
protected |
Called to login to a SOCKSv5 proxy.
References __tr2qs, _OUTPUT_VERBOSE, KviProxy::hasPass(), KviProxy::hasUser(), m_pProxy, KviProxy::normalizeUserAndPass(), outputProxyMessage(), ProxySelectAuthMethodV5, sendRawData(), and setState().
Referenced by connectedToProxy().
|
protected |
Sends the request details.
References KviMemory::allocate(), KviIrcServer::cacheIp(), KviMemory::free(), KviIrcServer::hostName(), KviIrcServer::ip(), KviIrcServer::isIPv6(), KviNetUtils::isValidStringIp(), m_pIrcServer, KviMemory::move(), KviIrcServer::port(), ProxyFinalV5, sendRawData(), setState(), and KviNetUtils::stringIpToBinaryIp().
Referenced by proxyHandleV5AuthReply(), and proxyHandleV5MethodReply().
|
protectedvirtual |
Appends a KviIrcSocketMsgEntry to the tail of the message queue.
The pMsg for this message is set to 0.
pMsg | The message to append to the queue |
References KVI_ASSERT, m_pSendQueueHead, m_pSendQueueTail, and _KviIrcSocketMsgEntry::next_ptr.
Referenced by sendPacket(), and sendRawData().
|
protected |
Removes all messages from the queue.
References m_pSendQueueHead, and queue_removeMessage().
Referenced by clearOutputQueue(), and reset().
|
protected |
Removes a message from the head of the queue.
References KviMemory::free(), KVI_ASSERT, m_pSendQueueHead, m_pSendQueueTail, _KviIrcSocketMsgEntry::next_ptr, and _KviIrcSocketMsgEntry::pData.
Referenced by flushSendQueue(), and queue_removeAllMessages().
|
protected |
Removes private messages from the queue.
References KviDataBuffer::data(), free_msgEntry(), kvi_strEqualCIN(), m_pSendQueueHead, m_pSendQueueTail, _KviIrcSocketMsgEntry::next_ptr, _KviIrcSocketMsgEntry::pData, and KviDataBuffer::size().
Referenced by clearOutputQueue().
|
protected |
Raises an error.
eError | The error to raise |
References KviError::getDescription(), m_eLastError, m_state, outputSocketError(), outputSocketMessage(), ProxyHttpError, and KviError::RemoteEndClosedConnection.
Referenced by abort(), connectionTimedOut(), doSSLHandshake(), flushSendQueue(), handleInvalidSocketRead(), proxyHandleV4FinalReply(), proxyHandleV5AuthReply(), proxyHandleV5FinalReply(), proxyHandleV5MethodReply(), readData(), readProxyData(), and writeNotifierFired().
|
inline |
Returns the number of bytes read.
|
protectedslot |
Called when the read notifier is enabled.
References flushSendQueue(), handleInvalidSocketRead(), kvi_socket_recv(), m_bInProcessData, m_pLink, m_pRsn, m_pSendQueueHead, m_sock, m_uReadBytes, KviIrcLink::processData(), raiseError(), reset(), and KviError::SSLError.
Referenced by linkUp().
|
protectedslot |
Called when the proxy read notifier encounters an error.
References KviWindow::decodeText(), handleInvalidSocketRead(), kvi_socket_recv(), m_pConsole, m_sock, and outputProxyMessage().
Referenced by proxyHandleHttpFinalReply().
|
protectedslot |
Called when the proxy read notifier is enabled.
References handleInvalidSocketRead(), kvi_socket_recv(), m_sock, m_state, ProxyFinalHttp, ProxyFinalV4, ProxyFinalV5, proxyHandleHttpFinalReply(), proxyHandleV4FinalReply(), proxyHandleV5AuthReply(), proxyHandleV5FinalReply(), proxyHandleV5MethodReply(), ProxySelectAuthMethodV5, ProxyUserPassV5, raiseError(), reset(), and KviError::UnrecognizedProxyReply.
Referenced by connectedToProxy().
|
protectedvirtual |
Resets the connection.
References KVI_INVALID_SOCKET, kvi_socket_destroy(), kvi_socket_isValid(), m_bInProcessData, m_pFlushTimer, m_pIrcServer, m_pProxy, m_pRsn, m_pTimeoutTimer, m_pWsn, m_sock, m_tAntiFloodLastMessageTime, m_uReadBytes, m_uSentBytes, m_uSentPackets, queue_removeAllMessages(), and setState().
Referenced by abort(), connectionTimedOut(), doSSLHandshake(), flushSendQueue(), handleInvalidSocketRead(), proxyHandleV4FinalReply(), proxyHandleV5AuthReply(), proxyHandleV5FinalReply(), proxyHandleV5MethodReply(), readData(), readProxyData(), startConnection(), writeNotifierFired(), and ~KviIrcSocket().
bool KviIrcSocket::sendPacket | ( | KviDataBuffer * | pData | ) |
Returns true if the packet is sent to the socket.
pData | The source data packet |
References KviMemory::allocate(), Connected, flushSendQueue(), m_bInProcessData, m_state, _KviIrcSocketMsgEntry::pData, and queue_insertMessage().
Referenced by KviIrcLink::sendPacket().
|
protected |
Sends raw data to the socket.
pcBuffer | The data buffer |
iBufLen | The size of the buffer |
References KviMemory::allocate(), Connecting, KviDataBuffer::data(), flushSendQueue(), m_bInProcessData, m_state, KviMemory::move(), _KviIrcSocketMsgEntry::pData, and queue_insertMessage().
Referenced by proxyAuthUserPassV5(), proxyLoginHttp(), proxyLoginV4(), proxyLoginV5(), and proxySendTargetDataV5().
|
inline |
Returns the number of bytes sent.
|
inline |
Returns the number of packets sent.
|
protectedvirtual |
Sets the state of the socket.
state | The state :) |
References m_pLink, m_state, KviIrcLink::socketStateChange(), and state().
Referenced by connectedToProxy(), linkUp(), proxyAuthUserPassV5(), proxyHandleHttpFinalReply(), proxyLoginHttp(), proxyLoginV4(), proxyLoginV5(), proxySendTargetDataV5(), reset(), and startConnection().
KviError::Code KviIrcSocket::startConnection | ( | KviIrcServer * | pServer, |
KviProxy * | pProxy = 0 , |
||
const char * | pcBindAddress = 0 |
||
) |
Starts the connection.
pServer | The server where to connect to |
pProxy | The proxy to use during connection |
pcBindAddress | The address to bind the connection to |
References __tr2qs, _OUTPUT_VERBOSE, KviSockaddr::addressLength(), KviError::AnotherConnectionInProgress, KviError::AsyncSocketFailed, connect(), Connecting, connectionTimedOut(), KviProxy::Http, KviError::InvalidIpAddress, KviError::InvalidProxyAddress, KviProxy::ip(), KviIrcServer::ip(), KviProxy::isIPv6(), KviIrcServer::isIPv6(), KviNetUtils::isValidStringIp(), KVI_OPTION_UINT, kvi_socket_bind(), kvi_socket_connect(), kvi_socket_create(), kvi_socket_error(), kvi_socket_getsockopt(), KVI_SOCKET_PF_INET, KVI_SOCKET_PF_INET6, KVI_SOCKET_PROTO_TCP, kvi_socket_recoverableConnectError(), kvi_socket_setNonBlocking(), KVI_SOCKET_TYPE_STREAM, KviOption_uintIrcSocketTimeout, m_pIrcServer, m_pProxy, m_pTimeoutTimer, m_pWsn, m_sock, m_state, KviError::NoIPv6Support, KviError::NoSSLSupport, outputSocketMessage(), outputSocketWarning(), KviProxy::port(), KviIrcServer::port(), KviProxy::protocol(), reset(), setState(), KviSockaddr::socketAddress(), KviError::SocketCreationFailed, KviProxy::Socks4, KviProxy::Socks5, KviError::SocksV4LacksIPv6Support, KviError::Success, KviError::translateSystemError(), KviError::UnknownError, KviIrcServer::useSSL(), and writeNotifierFired().
Referenced by KviIrcLink::resolverTerminated().
|
inline |
Returns the state of the socket.
Referenced by KviIrcLink::processData(), setState(), and KviIrcLink::socketStateChange().
|
inline |
Returns true if the socket is a Secure Socket Layer (SSL)
Referenced by context_kvs_fnc_getSSLCertInfo().
|
protectedslot |
Called when the write notifier is enabled.
References connectionEstablished(), kvi_socket_getsockopt(), m_pTimeoutTimer, m_pWsn, m_sock, raiseError(), reset(), KviError::translateSystemError(), and KviError::UnknownError.
Referenced by startConnection().
|
protected |
Referenced by KviIrcSocket(), readData(), reset(), sendPacket(), and sendRawData().
|
protected |
Referenced by KviIrcSocket(), and raiseError().
|
protected |
|
protected |
Referenced by flushSendQueue(), KviIrcSocket(), reset(), and ~KviIrcSocket().
|
protected |
Referenced by connectedToIrcServer(), KviIrcSocket(), proxyLoginHttp(), proxyLoginV4(), proxySendTargetDataV5(), reset(), and startConnection().
|
protected |
Referenced by KviIrcSocket(), readData(), and setState().
|
protected |
|
protected |
Referenced by connectedToProxy(), doSSLHandshake(), KviIrcSocket(), linkUp(), proxyHandleHttpFinalReply(), readData(), and reset().
|
protected |
|
protected |
Referenced by KviIrcSocket(), outputQueueSize(), queue_insertMessage(), queue_removeMessage(), and queue_removePrivateMessages().
|
protected |
Referenced by KviIrcSocket(), reset(), startConnection(), and writeNotifierFired().
|
protected |
Referenced by doSSLHandshake(), KviIrcSocket(), linkUp(), proxyHandleHttpFinalReply(), reset(), startConnection(), and writeNotifierFired().
|
protected |
|
protected |
Referenced by abort(), flushSendQueue(), getLocalHostIp(), KviIrcSocket(), raiseError(), readProxyData(), sendPacket(), sendRawData(), setState(), and startConnection().
|
protected |
Referenced by flushSendQueue(), KviIrcSocket(), and reset().
|
protected |
Referenced by KviIrcSocket().
|
protected |
Referenced by KviIrcSocket(), readData(), and reset().
|
protected |
Referenced by flushSendQueue(), KviIrcSocket(), and reset().
|
protected |
Referenced by flushSendQueue(), KviIrcSocket(), and reset().