From 8b9e630718d4abcf2677448120cc80c1791a444e Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 23 Aug 2010 12:37:34 +0000 Subject: add an example for XMPP server --- examples/example_8_server/main.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 examples/example_8_server/main.cpp (limited to 'examples/example_8_server/main.cpp') diff --git a/examples/example_8_server/main.cpp b/examples/example_8_server/main.cpp new file mode 100644 index 00000000..ad826007 --- /dev/null +++ b/examples/example_8_server/main.cpp @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2008-2010 The QXmpp developers + * + * Author: + * Jeremy Lainé + * + * Source: + * http://code.google.com/p/qxmpp + * + * This file is a part of QXmpp library. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + */ + +#include + +#include "QXmppLogger.h" +#include "xmppServer.h" + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + + xmppServer server; + server.setDomain("example.com"); + server.listenForClients(); + return a.exec(); +} -- cgit v1.2.3