Files
@ bf4183c181eb
Branch filter:
Location: libtransport.git/examples/server_connect/main.cpp - annotation
bf4183c181eb
513 B
text/x-c++hdr
Better Config class
e678a46286f4 e678a46286f4 c5edfd19b1aa e678a46286f4 e678a46286f4 e678a46286f4 e678a46286f4 e678a46286f4 e678a46286f4 bf4183c181eb bf4183c181eb e678a46286f4 e678a46286f4 e678a46286f4 c5edfd19b1aa e678a46286f4 e678a46286f4 bf4183c181eb 99aff9256622 c5edfd19b1aa 99aff9256622 99aff9256622 99aff9256622 e678a46286f4 | #include "transport/config.h"
#include "transport/transport.h"
#include "transport/logger.h"
#include "Swiften/EventLoop/SimpleEventLoop.h"
using namespace Transport;
int main(void)
{
Config config;
if (!config.load("sample.cfg")) {
std::cout << "Can't open sample.cfg configuration file.\n";
return 1;
}
Swift::logging = true;
Swift::SimpleEventLoop eventLoop;
Component transport(&eventLoop, &config);
Logger logger(&transport);
transport.connect();
eventLoop.run();
}
|