Changeset 1232 for code/branches/network3/src/network/ConnectionManager.h
- Timestamp:
- May 5, 2008, 1:19:22 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network3/src/network/ConnectionManager.h
r1168 r1232 71 71 class ConnectionManager{ 72 72 public: 73 ConnectionManager(); 73 74 ConnectionManager(ClientInformation *head); 74 75 ConnectionManager(int port, const char *address, ClientInformation *head); … … 84 85 bool sendPackets(ENetEvent *event); 85 86 bool sendPackets(); 87 bool createClient(int clientID); 86 88 87 //##### for testing purpose only #####88 ConnectionManager();89 std::map<int, int> testGetClientsShip() {90 return clientsShip;91 }92 void testAddClientsShipID( int clientID, int objectID ) {93 addClientsObjectID( clientID, objectID );94 }95 int testGetClientsShipID( int clientID ) {96 return getClientsShipID( clientID );97 }98 int testGetObjectsClientID( int objectID ) {99 return getObjectsClientID( objectID );100 }101 void testDeleteClientsIDReg( int clientID ) {102 deleteClientIDReg( clientID );103 }104 void testDeleteObjectIDReg( int objectID ) {105 deleteObjectIDReg( objectID );106 }107 //##### for testing purpose only #####108 89 private: 109 90 bool clientDisconnect(ENetPeer *peer); 110 //bool clientDisconnect(ENetPeer peer);111 91 bool processData(ENetEvent *event); 112 92 bool addClient(ENetEvent *event); … … 117 97 void syncClassid(int clientID); 118 98 ENetPeer *getClientPeer(int clientID); 99 bool createShip(ClientInformation *client); 100 bool sendWelcome(int clientID, int shipID, bool allowed); 101 bool addFakeConnectRequest(ENetEvent *ev); 119 102 PacketBuffer buffer; 120 103 PacketGenerator packet_gen; … … 126 109 ClientInformation *head_; 127 110 111 112 // int getNumberOfClients(); 128 113 //functions to map what object every clients uses 129 std::map<int, int> clientsShip;114 /*std::map<int, int> clientsShip; 130 115 void addClientsObjectID( int clientID, int objectID ); 131 116 int getClientsShipID( int clientID ); 132 117 int getObjectsClientID( int objectID ); 133 118 void deleteClientIDReg( int clientID ); 134 void deleteObjectIDReg( int objectID ); 135 int getNumberOfClients(); 119 void deleteObjectIDReg( int objectID );*/ 136 120 }; 137 121
Note: See TracChangeset
for help on using the changeset viewer.