

Public Member Functions | |
| posixSocket () | |
| ~posixSocket () | |
| void | connect (const vmime::string &address, const vmime::port_t port) |
| bool | isConnected () const |
| void | disconnect () |
| void | receive (vmime::string &buffer) |
| size_type | receiveRaw (char *buffer, const size_type count) |
| void | send (const vmime::string &buffer) |
| void | sendRaw (const char *buffer, const size_type count) |
| size_type | getBlockSize () const |
Static Protected Member Functions | |
| static void | throwSocketError (const int err) |
| posixSocket | ( | ) |
| ~posixSocket | ( | ) |
| void connect | ( | const vmime::string & | address, | |
| const vmime::port_t | port | |||
| ) | [virtual] |
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.
References socket::socket(), and posixSocket::throwSocketError().
| void disconnect | ( | ) | [virtual] |
Disconnect from the server.
Implements socket.
| posixSocket::size_type getBlockSize | ( | ) | const [virtual] |
Return the preferred maximum block size when reading from or writing to this stream.
Implements socket.
| bool isConnected | ( | ) | const [virtual] |
Test whether this socket is connected.
Implements socket.
| void receive | ( | vmime::string & | buffer | ) | [virtual] |
Receive (text) data from the socket.
| buffer | buffer in which to write received data |
Implements socket.
References posixSocket::receiveRaw().
| posixSocket::size_type receiveRaw | ( | char * | buffer, | |
| const size_type | count | |||
| ) | [virtual] |
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 posixSocket::throwSocketError().
Referenced by posixSocket::receive().
| void send | ( | const vmime::string & | buffer | ) | [virtual] |
Send (text) data to the socket.
| buffer | data to send |
Implements socket.
References posixSocket::sendRaw().
Referenced by posixSocket::sendRaw().
| void sendRaw | ( | const char * | buffer, | |
| const size_type | count | |||
| ) | [virtual] |
Send (raw) data to the socket.
| buffer | data to send | |
| count | number of bytes to send (size of buffer) |
Implements socket.
References platform::getHandler(), posixSocket::send(), and posixSocket::throwSocketError().
Referenced by posixSocket::send().
| void throwSocketError | ( | const int | err | ) | [static, protected] |
Referenced by posixSocket::connect(), posixSocket::receiveRaw(), and posixSocket::sendRaw().
1.6.2