class TCPSlaveBase |
|
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. |
|
Constructor.
autoSsl - if true, will automatically invoke startSsl() right after connecting. In the absence of errors the use of SSL will therefore be transparent to higher layers. |
|
Returns true when end of data is reached. |
|
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. protocol - the protocol being used host - hostname port - port number sendError - if true sends error message to calling app on error. Returns on succes, true is returned. on failure, false is returned and an appropriate error message is sent to the application. |
|
Close the connection and forget non-permanent data like the peer host. |
|
Will start SSL after connecting?
Returns if so, true is returned. if not, false is returned. |
|
Determines whether or not we are still connected
to the remote machine.
return true if the socket is still active or false otherwise. |
|
Is the current connection using SSL?
Returns if so, true is returned. if not, false is returned. |
|
the current port for this service |
|
Read incoming data from the remote host.
data - storage for the data read from server len - length of the data (in bytes) to read from the server Returns the actual size of data that was obtained |
|
Same as read() except it reads data one line at a time. |
|
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 connectToHost. b - true to make the connection a blocking one, false otherwise. |
|
Return the socket object, if the class ever needs to do anything to it |
|
Start using SSL on the connection. You can use it right after connecting
for classic, transparent to the protocol SSL. Calling it later can be
used to implement e.g. SMTP's STARTTLS feature.
Returns on success, true is returned. on failure, false is returned. |
|
|
Wait for incoming data on the socket
for the period specified by t.
t - length of time in seconds that we should monitor the socket before timing out. Returns true if any activity was seen on the socket before the timeout value was reached, false otherwise. |
|
Send data to the remote host.
data - data to be sent to remote machine len - the length (in bytes) of the data to be sent Returns the actual size of the data that was sent |
ResultOk | - 1 | - | ||
ResultFailed | - 0 | - | ||
ResultOverridden | - 2 | - |