Changeset 3209 for code/branches/netp5/src/network/Connection.cc
- Timestamp:
- Jun 23, 2009, 2:12:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp5/src/network/Connection.cc
r3202 r3209 29 29 #include "Connection.h" 30 30 31 #include <iostream>32 31 #include <cassert> 32 #include <enet/enet.h> 33 33 #include <OgreTimer.h> 34 35 #include "util/Debug.h" 36 #include "util/Math.h" 37 #include "util/Sleep.h" 38 #include "ClientInformation.h" 39 #include "synchronisable/Synchronisable.h" 40 #include "packet/ClassID.h" 34 #include "packet/Packet.h" 41 35 42 36 namespace orxonox … … 55 49 Connection::~Connection(){ 56 50 Connection::instance_=0; 51 } 52 53 int Connection::service(ENetEvent* event) { 54 return enet_host_service( this->host_, event, NETWORK_WAIT_TIMEOUT ); 55 } 56 57 void Connection::disconnectPeer(ENetPeer *peer) { 58 enet_peer_disconnect(peer, 0); 57 59 } 58 60 … … 96 98 } 97 99 100 bool Connection::processPacket(ENetEvent* event) { 101 packet::Packet *p = packet::Packet::createPacket(event->packet, event->peer); 102 return p->process(); 103 } 104 98 105 }
Note: See TracChangeset
for help on using the changeset viewer.