diff options
author | Vincent Richard <[email protected]> | 2006-01-29 17:36:34 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2006-01-29 17:36:34 +0000 |
commit | 1539754d5357df5eed7a88cc3f2955c87af9faae (patch) | |
tree | 76089fb32db228042b3185fcd7889e91e0f5fe92 /examples | |
parent | getPeerCertificates() should be const. (diff) | |
download | vmime-1539754d5357df5eed7a88cc3f2955c87af9faae.tar.gz vmime-1539754d5357df5eed7a88cc3f2955c87af9faae.zip |
Added service::isSecuredConnection() and service::getConnectionInfos() to retrieve information about the connection.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/example6.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/example6.cpp b/examples/example6.cpp index 344a4d87..7bd7a82c 100644 --- a/examples/example6.cpp +++ b/examples/example6.cpp @@ -516,6 +516,13 @@ static void connectStore() // Connect to the mail store st->connect(); + // Display some information about the connection + vmime::ref <vmime::net::connectionInfos> ci = st->getConnectionInfos(); + + std::cout << std::endl; + std::cout << "Connected to '" << ci->getHost() << "' (port " << ci->getPort() << ")" << std::endl; + std::cout << "Connection is " << (st->isSecuredConnection() ? "" : "NOT ") << "secured." << std::endl; + // Open the default folder in this store vmime::ref <vmime::net::folder> f = st->getDefaultFolder(); // vmime::ref <vmime::net::folder> f = st->getFolder(vmime::utility::path("a")); |