#include "Test.h" #include #include "../../TestWalker/MSClient.h" ConnectTest::ConnectTest() { ok = 0; } void ConnectTest::init() { std::cout << "starting connection Test\n"; } void ConnectTest::run() {/* bool ok = 1; MSClient msc; std::cout << "\x1...Main Server...\x1\n"; if( !msc.registerSSL() ) { ok = 0; std::cerr << "client registration failed " __FILE__ ":" << __LINE__ << "\n"; return; } std::cout << "\x1...Erhaltung Server...\x1\n"; ESClient *esc = msc.createErhaltungServerClient(); if( !esc ) { ok = 0; std::cerr << "no Erhaltung Server available " __FILE__ ":" << __LINE__ << "\n"; } else { if( !esc->verbinden() ) { ok = 0; std::cerr << "no connection to Erhaltung Server " __FILE__ ":" << __LINE__ << "\n"; } } std::cout << "\x1...Patch Server...\x1\n"; PSClient *psc = msc.createPatchServerClient(); if( !psc ) { ok = 0; std::cerr << "no Patch Server available " __FILE__ ":" << __LINE__ << "\n"; } else { if( !psc->verbinde() ) { ok = 0; std::cerr << "no connection to Patch Server " __FILE__ ":" << __LINE__ << "\n"; } } // TODO std::cout << "\x1...Abmeldung beim Server...\x1\n"; if( psc ) { if( !psc->trenne( 1 ) ) { ok = 0; std::cerr << "unable to close connection to Patch Server " __FILE__ ":" << __LINE__ << "\n"; } psc->release(); } if( esc ) esc->release(); if( !msc.unregister() ) { ok = 0; std::cerr << "client unregistration failed " __FILE__ ":" << __LINE__ << "\n"; } this->ok = ok;*/ Network::SSLKlient *c = new Network::SSLKlient(); c->release(); Network::SSLKlient *c2 = new Network::SSLKlient(); c2->release(); } bool ConnectTest::failed() { return !ok; } void ConnectTest::destroy() { delete this; }