diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-06-11 23:11:25 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-06-11 23:11:25 +0200 |
commit | 99ec36989631dd116524a5fab03f1c1977870752 (patch) | |
tree | 073e2e8e09daf6d304afdf11ae727a69ecfa2f20 /src/madc.cpp | |
parent | cc0d762d1b58fb507903e1f390af76e6e8e44dd5 (diff) | |
download | mad-99ec36989631dd116524a5fab03f1c1977870752.tar mad-99ec36989631dd116524a5fab03f1c1977870752.zip |
Einfache TLS-Client-Verbindung implementiert
Diffstat (limited to 'src/madc.cpp')
-rw-r--r-- | src/madc.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/madc.cpp b/src/madc.cpp index 15c35ce..f55779e 100644 --- a/src/madc.cpp +++ b/src/madc.cpp @@ -17,6 +17,25 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "Net/ClientConnection.h" +#include "Net/IPAddress.h" +#include <iostream> + int main() { + Mad::Net::Connection::init(); + + Mad::Net::ClientConnection connection; + + try { + connection.connect(Mad::Net::IPAddress("127.0.0.1", 6666)); + } + catch(Mad::Net::Exception &e) { + std::cerr << "Connection error: " << e.what() << std::endl; + } + + connection.disconnect(); + + Mad::Net::Connection::deinit(); + return 0; } |