Changeset 3209 for code/branches/netp5/src/network/Connection.h
- Timestamp:
- Jun 23, 2009, 2:12:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp5/src/network/Connection.h
r3203 r3209 43 43 #include "NetworkPrereqs.h" 44 44 45 #include <string>46 #include <map>47 #include <enet/enet.h>48 49 #include "packet/Packet.h"50 51 45 namespace orxonox 52 46 { … … 59 53 class _NetworkExport Connection{ 60 54 public: 61 ~Connection();55 virtual ~Connection(); 62 56 63 57 static bool addPacket(ENetPacket *packet, ENetPeer *peer); … … 69 63 static Connection* getInstance(){ return Connection::instance_; } 70 64 71 int service(ENetEvent* event) { return enet_host_service( this->host_, event, NETWORK_WAIT_TIMEOUT ); }72 void disconnectPeer(ENetPeer *peer) { enet_peer_disconnect(peer, 0); }65 int service(ENetEvent* event); 66 void disconnectPeer(ENetPeer *peer); 73 67 74 68 void processQueue(); 75 69 virtual void addClient(ENetEvent* event)=0; 76 70 virtual void disconnectPeer(ENetEvent* event)=0; 77 virtual bool processPacket(ENetEvent* event) { packet::Packet *p = packet::Packet::createPacket(event->packet, event->peer); return p->process(); }71 virtual bool processPacket(ENetEvent* event); 78 72 79 73 ENetHost *host_;
Note: See TracChangeset
for help on using the changeset viewer.