Public Methods | |
| InetClient () | |
| Creates the Inet client (do not establish connection yet). | |
| InetClient (const std::string &host, word port) | |
| Creates the Inet client (and establishes the connection). | |
| ~InetClient () | |
| Deletes the Inet client (and disconnects from the server). | |
| void | open (const std::string &host, word port) |
| Connects to the server. | |
| std::string | readLine () |
| Read a text line from the server. | |
| void | writeLine (const std::string &line) |
| Write a text to the server. | |
| word | InetClient::readRaw (void *buffer, word length) |
| Read binary data from the server. | |
| void | InetClient::writeRaw (const void *buffer, word length) |
| Write binary data to the server. | |
This class implements the basics for a internet service client such as Http, Smtp, Nntp... It assumes that all those protocols are basically text-based and line-oriented. They exchange information between the client and the server using lines of text most of the time, and opaque binary data in few occasions.
|
|
Creates the Inet client (do not establish connection yet).
|
|
||||||||||||
|
Creates the Inet client (and establishes the connection).
|
|
|
Deletes the Inet client (and disconnects from the server).
|
|
||||||||||||
|
Read binary data from the server.
|
|
||||||||||||
|
Write binary data to the server.
|
|
||||||||||||
|
Connects to the server.
|
|
|
Read a text line from the server. The line obtained does not contain the end-of-line marker. |
|
|
Write a text to the server. The line sent must not contain the end-of-line marker. |
1.3-rc2