Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 21, 2009, 12:27:19 AM (15 years ago)
Author:
scheusso
Message:

rest of the cleanup ( mostly client connection handling)
network is now single-threaded ( only in order to become multithreaded again, but thats another story ;) )

File:
1 edited

Legend:

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

    r3201 r3202  
    5353    const int NETWORK_PORT = 55556;
    5454    const int NETWORK_MAX_CONNECTIONS = 50;
    55     const int NETWORK_WAIT_TIMEOUT = 1;
     55    const int NETWORK_WAIT_TIMEOUT = 0;
    5656    const int NETWORK_DEFAULT_CHANNEL = 0;
    57 
    58 //   struct _NetworkExport ClientList{
    59 //     ENetEvent *event;
    60 //     int ID;
    61 //     ClientList *next;
    62 //   };
     57    const int NETWORK_MAX_QUEUE_PROCESS_TIME = 5;
    6358
    6459  class _NetworkExport Connection{
     
    7974    void processQueue();
    8075    virtual void addClient(ENetEvent* event)=0;
    81     virtual void disconnectClient(ENetEvent* event)=0;
     76    virtual void disconnectPeer(ENetEvent* event)=0;
    8277    virtual bool processPacket(ENetEvent* event){ packet::Packet *p = packet::Packet::createPacket(event->packet, event->peer); return p->process(); }
    8378   
Note: See TracChangeset for help on using the changeset viewer.