Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 23, 2009, 2:12:44 AM (15 years ago)
Author:
rgrieder
Message:

Cleanup in network plus a few dependency reductions (no enet-function inlines, using enum PacketFlag instead of the enet version)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp5/src/network/Connection.h

    r3203 r3209  
    4343#include "NetworkPrereqs.h"
    4444
    45 #include <string>
    46 #include <map>
    47 #include <enet/enet.h>
    48 
    49 #include "packet/Packet.h"
    50 
    5145namespace orxonox
    5246{
     
    5953  class _NetworkExport Connection{
    6054  public:
    61     ~Connection();
     55    virtual ~Connection();
    6256   
    6357    static bool addPacket(ENetPacket *packet, ENetPeer *peer);
     
    6963    static Connection* getInstance(){ return Connection::instance_; }
    7064   
    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);
    7367   
    7468    void processQueue();
    7569    virtual void addClient(ENetEvent* event)=0;
    7670    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);
    7872   
    7973    ENetHost *host_;
Note: See TracChangeset for help on using the changeset viewer.