|
VMime
|
#include <SASLSocket.hpp>


Public Member Functions | |
| SASLSocket (shared_ptr< SASLSession > sess, shared_ptr< net::socket > wrapped) | |
| ~SASLSocket () | |
| void | connect (const string &address, const port_t port) |
| void | disconnect () |
| bool | isConnected () const |
| bool | waitForRead (const int msecs=30000) |
| bool | waitForWrite (const int msecs=30000) |
| void | receive (string &buffer) |
| size_t | receiveRaw (byte_t *buffer, const size_t count) |
| void | send (const string &buffer) |
| void | send (const char *str) |
| void | sendRaw (const byte_t *buffer, const size_t count) |
| size_t | sendRawNonBlocking (const byte_t *buffer, const size_t count) |
| size_t | getBlockSize () const |
| unsigned int | getStatus () const |
| const string | getPeerName () const |
| const string | getPeerAddress () const |
| shared_ptr< net::timeoutHandler > | getTimeoutHandler () |
| void | setTracer (shared_ptr< net::tracer > tracer) |
| shared_ptr< net::tracer > | getTracer () |
| Public Member Functions inherited from socket | |
| virtual | ~socket () |
| virtual void | setTracer (shared_ptr< tracer > tracer)=0 |
Additional Inherited Members | |
| Public Types inherited from socket | |
| enum | Status { STATUS_WOULDBLOCK = 0xf , STATUS_WANT_READ = 0x1 , STATUS_WANT_WRITE = 0x2 } |
| Protected Member Functions inherited from socket | |
| socket () | |
| Protected Member Functions inherited from object | |
| object () | |
| object (const object &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
A socket which provides data integrity and/or privacy protection.
| SASLSocket | ( | shared_ptr< SASLSession > | sess, |
| shared_ptr< net::socket > | wrapped ) |
| ~SASLSocket | ( | ) |
Connect to the specified address and port.
| address | server address (this can be a full qualified domain name or an IP address, doesn't matter) |
| port | server port |
Implements socket.
|
virtual |
Disconnect from the server.
Implements socket.
|
virtual |
Return the preferred maximum block size when reading from or writing to this stream.
Implements socket.
|
virtual |
Return the address of peer this socket is connected to.
Implements socket.
|
virtual |
Return the hostname of peer this socket is connected to.
Implements socket.
|
virtual |
|
virtual |
Return the timeout handler associated with this socket.
Implements socket.
|
virtual |
|
virtual |
Test whether this socket is connected.
Implements socket.
|
virtual |
Receive text data from the socket.
| buffer | buffer in which to write received data |
Implements socket.
References stringUtils::makeStringFromBytes(), and receiveRaw().
Receive raw data from the socket.
| buffer | buffer in which to write received data |
| count | maximum number of bytes to receive (size of buffer) |
Implements socket.
References vmime::count().
Referenced by receive().
|
virtual |
|
virtual |
Send raw data to the socket.
| buffer | data to send |
| count | number of bytes to send (size of buffer) |
Implements socket.
References vmime::count().
Send raw data to the socket.
Function may returns before all data is sent.
| buffer | data to send |
| count | number of bytes to send (size of buffer) |
Implements socket.
References vmime::count().
| void setTracer | ( | shared_ptr< net::tracer > | tracer | ) |
|
virtual |
Block until new data is available for reading.
The function will timeout after msecs milliseconds.
| timeout | maximum wait time, in milliseconds (default is 30000); resolution is 10ms |
Implements socket.
|
virtual |
Block until pending data has been written and new data can be written.
The function will timeout after msecs milliseconds.
| timeout | maximum wait time, in milliseconds (default is 30000); resolution is 10ms |
Implements socket.