Files
@ 941bba0427fe
Branch filter:
Location: libtransport.git/examples/server_connect/main.cpp - annotation
941bba0427fe
1008 B
text/x-c++hdr
Fixed compilation with latest swiften
e678a46286f4 e678a46286f4 c5edfd19b1aa e678a46286f4 07859ef3936a 07859ef3936a 07859ef3936a 07859ef3936a 07859ef3936a 07859ef3936a e678a46286f4 e678a46286f4 e678a46286f4 07859ef3936a 07859ef3936a 07859ef3936a 07859ef3936a 877d783276c0 877d783276c0 07859ef3936a 07859ef3936a 07859ef3936a 07859ef3936a e678a46286f4 e678a46286f4 c5edfd19b1aa e678a46286f4 07859ef3936a 99aff9256622 07859ef3936a 07859ef3936a 07859ef3936a 07859ef3936a 99aff9256622 07859ef3936a e678a46286f4 | #include "transport/config.h"
#include "transport/transport.h"
#include "transport/logger.h"
#include "Swiften/EventLoop/SimpleEventLoop.h"
#include "Swiften/Network/BoostTimerFactory.h"
#include "Swiften/Network/BoostIOServiceThread.h"
#include "Swiften/Network/BoostNetworkFactories.h"
#include "Swiften/Server/UserRegistry.h"
#include "Swiften/Server/Server.h"
#include "Swiften/Swiften.h"
using namespace Transport;
class DummyUserRegistry : public Swift::UserRegistry {
public:
DummyUserRegistry() {}
virtual bool isValidUserPassword(const Swift::JID&user, const Swift::SafeByteArray&) const {
onPasswordValid(user.toString());
return true;
}
};
int main(void)
{
Swift::logging = true;
Swift::SimpleEventLoop loop;
Swift::BoostNetworkFactories *m_factories = new Swift::BoostNetworkFactories(&loop);
DummyUserRegistry dummyregistry;
Swift::Server server(&loop, m_factories, &dummyregistry, "localhost", 5222);
server.start();
loop.run();
}
|