Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/merge/src/network/dummyclient4.cc @ 1282

Last change on this file since 1282 was 1278, checked in by scheusso, 17 years ago

new dummy[server,client]4; adapted connectionmanager to new boost::thread syntax

File size: 792 bytes
Line 
1#include <iostream>
2#include <string>
3#include <enet/enet.h>
4#include <network/PacketManager.h>
5#include <network/PacketTypes.h>
6#include <network/Client.h>
7#include "core/Tickable.h"
8#include "core/BaseObject.h"
9#include "Synchronisable.h"
10#include "core/CoreIncludes.h"
11#include "objects/SpaceShip.h"
12
13int main() {
14  std::cout << "dummyclient4" << std::endl;
15  network::Client* client;
16  client = network::Client::createSingleton( "127.0.0.1", 55556 );
17  if(client->establishConnection())
18    std::cout << "established connection" << std::endl;
19  else{
20    std::cout << "could not establish connection" << std::endl;
21    return -1;
22  }
23  if(client->closeConnection())
24    std::cout << "closed connection" << std::endl;
25  else
26    std::cout << "could not close connection" << std::endl;
27}
28
29
Note: See TracBrowser for help on using the repository browser.