[Orxonox-commit 2589] r7294 - code/branches/ipv6/src/libraries/network

adrfried at orxonox.net adrfried at orxonox.net
Tue Aug 31 18:13:18 CEST 2010


Author: adrfried
Date: 2010-08-31 18:13:18 +0200 (Tue, 31 Aug 2010)
New Revision: 7294

Modified:
   code/branches/ipv6/src/libraries/network/ClientConnection.cc
   code/branches/ipv6/src/libraries/network/LANDiscoverable.cc
   code/branches/ipv6/src/libraries/network/LANDiscovery.cc
   code/branches/ipv6/src/libraries/network/ServerConnection.cc
Log:
made enet 1.3 compatible

Modified: code/branches/ipv6/src/libraries/network/ClientConnection.cc
===================================================================
--- code/branches/ipv6/src/libraries/network/ClientConnection.cc	2010-08-31 16:00:32 UTC (rev 7293)
+++ code/branches/ipv6/src/libraries/network/ClientConnection.cc	2010-08-31 16:13:18 UTC (rev 7294)
@@ -69,14 +69,14 @@
   {
     ENetEvent event;
 
-    this->host_ = enet_host_create(NULL, NETWORK_CLIENT_MAX_CONNECTIONS, 0, 0);
+    this->host_ = enet_host_create(NULL, NETWORK_CLIENT_MAX_CONNECTIONS, 0, 0, 0);
     if ( this->host_ == NULL )
     {
       COUT(2) << "ClientConnection: host_ == NULL" << std::endl;
       // error handling
       return false;
     }
-    this->server_ = enet_host_connect(this->host_, serverAddress_, NETWORK_CLIENT_CHANNELS);
+    this->server_ = enet_host_connect(this->host_, serverAddress_, NETWORK_CLIENT_CHANNELS, 0);
     if ( this->server_==NULL )
     {
       COUT(2) << "ClientConnection: server == NULL" << std::endl;

Modified: code/branches/ipv6/src/libraries/network/LANDiscoverable.cc
===================================================================
--- code/branches/ipv6/src/libraries/network/LANDiscoverable.cc	2010-08-31 16:00:32 UTC (rev 7293)
+++ code/branches/ipv6/src/libraries/network/LANDiscoverable.cc	2010-08-31 16:13:18 UTC (rev 7294)
@@ -65,7 +65,7 @@
     {
       ENetAddress bindAddress = { ENET_HOST_ANY, LAN_DISCOVERY_PORT };
       assert( this->host_ == 0 );
-      this->host_ = enet_host_create( &bindAddress, 10, 0, 0 );
+      this->host_ = enet_host_create( &bindAddress, 10, 0, 0, 0 );
     }
     else
     {

Modified: code/branches/ipv6/src/libraries/network/LANDiscovery.cc
===================================================================
--- code/branches/ipv6/src/libraries/network/LANDiscovery.cc	2010-08-31 16:00:32 UTC (rev 7293)
+++ code/branches/ipv6/src/libraries/network/LANDiscovery.cc	2010-08-31 16:13:18 UTC (rev 7294)
@@ -41,7 +41,7 @@
 
   LANDiscovery::LANDiscovery()
   {
-    this->host_ = enet_host_create(NULL, 10, 0, 0 );
+    this->host_ = enet_host_create(NULL, 10, 0, 0, 0 );
   }
 
   LANDiscovery::~LANDiscovery()
@@ -57,7 +57,7 @@
     address.port = LAN_DISCOVERY_PORT;
 
     ENetPeer* peer;
-    peer = enet_host_connect(this->host_, &address, 0);
+    peer = enet_host_connect(this->host_, &address, 0, 0);
 
     ENetEvent event;
     while( enet_host_service(this->host_, &event, 1000 ) )

Modified: code/branches/ipv6/src/libraries/network/ServerConnection.cc
===================================================================
--- code/branches/ipv6/src/libraries/network/ServerConnection.cc	2010-08-31 16:00:32 UTC (rev 7293)
+++ code/branches/ipv6/src/libraries/network/ServerConnection.cc	2010-08-31 16:13:18 UTC (rev 7294)
@@ -62,7 +62,7 @@
   }
 
   bool ServerConnection::openListener() {
-    this->host_ = enet_host_create(this->bindAddress_, NETWORK_MAX_CONNECTIONS, 0, 0);
+    this->host_ = enet_host_create(this->bindAddress_, NETWORK_MAX_CONNECTIONS, 0, 0, 0);
     if ( this->host_ == NULL )
       return false;
     else




More information about the Orxonox-commit mailing list