Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2008, 2:57:43 PM (16 years ago)
Author:
scheusso
Message:

changed concept of threading, had to change packetbuffer (using events now)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/ConnectionManager.h

    r1379 r1409  
    7777    ConnectionManager(int port, const char *address, ClientInformation *head);
    7878    ConnectionManager(int port, std::string address, ClientInformation *head);
    79     ENetPacket *getPacket(ENetAddress &address); // thread1
    80     ENetPacket *getPacket(int &clientID);
     79    //ENetPacket *getPacket(ENetAddress &address); // thread1
     80    //ENetPacket *getPacket(int &clientID);
     81    ENetEvent *getEvent();
    8182    bool queueEmpty();
    8283    void createListener();
     
    8788  //  bool sendPackets(ENetEvent *event);
    8889    bool sendPackets();
    89     bool createClient(int clientID);
     90    //bool createClient(int clientID);
    9091    void disconnectClient(ClientInformation *client);
     92    void syncClassid(int clientID);
     93    bool sendWelcome(int clientID, int shipID, bool allowed);
    9194
    9295  private:
    93     bool clientDisconnect(ENetPeer *peer);
    94     bool removeClient(int clientID);
     96//     bool clientDisconnect(ENetPeer *peer);
     97//     bool removeClient(int clientID);
    9598    bool processData(ENetEvent *event);
    96     bool addClient(ENetEvent *event);
     99    //bool addClient(ENetEvent *event);
    97100    void receiverThread();
    98101    void disconnectClients();
    99102    int getClientID(ENetPeer peer);
    100103    int getClientID(ENetAddress address);
    101     void syncClassid(int clientID);
    102104    ENetPeer *getClientPeer(int clientID);
    103     bool createShip(ClientInformation *client);
     105    //bool createShip(ClientInformation *client);
    104106    bool removeShip(ClientInformation *client);
    105     bool sendWelcome(int clientID, int shipID, bool allowed);
    106107    bool addFakeConnectRequest(ENetEvent *ev);
    107108    PacketBuffer buffer;
Note: See TracChangeset for help on using the changeset viewer.