summaryrefslogtreecommitdiffstats
path: root/src/madc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/madc.cpp')
-rw-r--r--src/madc.cpp19
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;
}