KIO::TCPSlaveBase Class Reference
#include <tcpslavebase.h>
Inheritance diagram for KIO::TCPSlaveBase:

Detailed Description
There are two classes that specifies the protocol between application (job) and kioslave.SlaveInterface is the class to use on the application end, SlaveBase is the one to use on the slave end.
Slave implementations should simply inherit SlaveBase
A call to foo() results in a call to slotFoo() on the other end.
Definition at line 45 of file tcpslavebase.h.
Public Member Functions | |
TCPSlaveBase (unsigned short int defaultPort, const QCString &protocol, const QCString &poolSocket, const QCString &appSocket) | |
TCPSlaveBase (unsigned short int defaultPort, const QCString &protocol, const QCString &poolSocket, const QCString &appSocket, bool useSSL) | |
Protected Member Functions | |
KDE_DEPRECATED ssize_t | Write (const void *data, ssize_t len) |
KDE_DEPRECATED ssize_t | Read (void *data, ssize_t len) |
KDE_DEPRECATED ssize_t | ReadLine (char *data, ssize_t len) |
KDE_DEPRECATED unsigned short int | GetPort (unsigned short int p) |
KDE_DEPRECATED bool | ConnectToHost (const QString &host, unsigned int port, bool sendError) |
KDE_DEPRECATED void | CloseDescriptor () |
KDE_DEPRECATED bool | AtEOF () |
KDE_DEPRECATED bool | InitializeSSL () |
KDE_DEPRECATED void | CleanSSL () |
ssize_t | write (const void *data, ssize_t len) |
ssize_t | read (void *data, ssize_t len) |
ssize_t | readLine (char *data, ssize_t len) |
void | setBlockSize (int sz) |
unsigned short int | port (unsigned short int _port) |
bool | connectToHost (const QString &host, unsigned int port, bool sendError=true) |
bool | usingSSL () const |
bool | usingTLS () const |
bool | usingTLS () |
bool | canUseTLS () |
int | startTLS () |
void | stopTLS () |
void | closeDescriptor () |
bool | atEnd () |
void | setSSLMetaData () |
bool | initializeSSL () |
void | cleanSSL () |
bool | isConnectionValid () |
int | connectResult () |
bool | waitForResponse (int t) |
void | setBlockConnection (bool b) |
void | setConnectTimeout (int t) |
bool | isSSLTunnelEnabled () |
void | setEnableSSLTunnel (bool enable) |
void | setRealHost (const QString &realHost) |
void | doConstructorStuff () |
int | verifyCertificate () |
void | certificatePrompt () |
bool | userAborted () const |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
int | m_iSock |
bool | m_bIsSSL |
unsigned short int | m_iPort |
unsigned short int | m_iDefaultPort |
QCString | m_sServiceName |
FILE * | fp |
Member Function Documentation
|
Returns true when end of data is reached.
|
|
Definition at line 94 of file tcpslavebase.h. |
|
Can we use TLS?
|
|
Cleans up all SSL settings.
|
|
Definition at line 104 of file tcpslavebase.h. |
|
Closes the current file descriptor. Call this function to properly close up the socket since it also takes care to prroperly close the stdio fstream stuff, as well as sets the socket back to -1 |
|
Definition at line 89 of file tcpslavebase.h. |
|
Returns the status of the connection.
This function allows you to invoke ConnectToHost with the
|
|
Performs the initial TCP connection stuff and/or SSL handshaking as necessary. Please note that unlike its deprecated counterpart, this function allows you to disable any error message from being sent back to the calling application! You can then use the connectResult() function to determine the result of the request for connection.
|
|
Definition at line 83 of file tcpslavebase.h. |
|
Definition at line 78 of file tcpslavebase.h. |
|
Initializs all SSL variables.
|
|
Definition at line 99 of file tcpslavebase.h. |
|
Determines whether or not we are still connected to the remote machine. This method may fail to detect a closed SSL connection.
return |
|
Returns true if SSL tunneling is enabled.
|
|
Determines the appropriate port to use. This functions attempts to discover the appropriate port.
|
|
This function acts like standard read function call except it is also capable of deciphering SSL data as well as handling data over SOCKSified connections.
|
|
Definition at line 68 of file tcpslavebase.h. |
|
Same as above except it reads data one line at a time.
|
|
Definition at line 73 of file tcpslavebase.h. |
|
Sets the mode of the connection to blocking or non-blocking.
Be sure to call this function before calling connectToHost. Otherwise, this setting will not have any effect until the next
|
|
Sets the maximum size of blocks read in during calls to readLine(). This allows a slave to optimize for the protocol which it implements. Ideally this should be (common_line_length+1) or so. Making this too large will have adverse effects on performance. Initial/default value is 256(bytes) |
|
Sets how long to wait for orignally connecting to the requested before timinig out.
Be sure to call this function before calling ConnectToHost, otherwise the setting will not take effect until the next call to
|
|
Set up SSL tunneling mode.
Calling this function with a Note that once you have successfully "tunneled" through the proxy server you must call this function with its argument set to false to properly connect to the SSL site.
|
|
Sets up the the real hostname for an SSL connection that goes through a proxy server. This function is essential in making sure that the real hostname is used for validating certificates from SSL sites!
|
|
Call this if you use persistent connections and want all the metadata restored. This is particularly important for SSL sessions since the app needs to know the state of connection, certificates, etc. |
|
Start using TLS on the connection.
|
|
Stop using TLS on the connection.
|
|
Are we using SSL?
Definition at line 183 of file tcpslavebase.h. |
|
|
|
Are we using TLS?
|
|
Wait for some type of activity on the socket for the period specified by
|
|
This function acts like standard write function call except it is also capable of making SSL or SOCKS connections.
|
|
Definition at line 63 of file tcpslavebase.h. |
The documentation for this class was generated from the following file: