123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #include "Test.h"
- #include <iostream>
- #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;
- }
|