From 99ec36989631dd116524a5fab03f1c1977870752 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 11 Jun 2008 23:11:25 +0200 Subject: Einfache TLS-Client-Verbindung implementiert --- src/madc.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/madc.cpp') 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 . */ +#include "Net/ClientConnection.h" +#include "Net/IPAddress.h" +#include + 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; } -- cgit v1.2.3