Changeset 660 for code/branches/FICN/src/network
- Timestamp:
- Dec 20, 2007, 4:26:02 PM (17 years ago)
- Location:
- code/branches/FICN/src/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/network/Server.cc
r636 r660 50 50 gamestates = new GameStateManager(clients); 51 51 } 52 52 53 53 /** 54 54 * This function opens the server by creating the listener thread … … 58 58 return; 59 59 } 60 60 61 61 /** 62 62 * This function closes the server … … 66 66 return; 67 67 } 68 68 69 69 /** 70 70 * This function sends out a message to all clients … … 95 95 return false; 96 96 } 97 97 98 98 /** 99 99 * Run this function once every tick … … 106 106 return; 107 107 } 108 108 109 109 /** 110 110 * processes all the packets waiting in the queue … … 119 119 } 120 120 } 121 121 122 122 /** 123 123 * takes a new snapshot of the gamestate and sends it to the clients … … 129 129 //std::cout << "sent gamestate" << std::endl; 130 130 } 131 131 132 132 /** 133 133 * sends the gamestate … … 151 151 int cid = temp->getID(); 152 152 std::cout << "server, got acked ID: " << gid << std::endl; 153 GameStateCompressed *gs = &(gamestates->popGameState(cid)); 153 GameStateCompressed *gs = &(gamestates->popGameState(cid)); // FIXME: taking address of temporary, check if correct 154 154 //std::cout << "adding gamestate" << std::endl; 155 155 connection->addPacket(packet_gen.gstate(gs), cid); … … 163 163 //return true; 164 164 } 165 165 166 166 void Server::processAck( ack *data, int clientID){ 167 167 clients->findClient(clientID)->setGamestateID(data->a); 168 168 } 169 169 170 170 } -
code/branches/FICN/src/network/dummyclient2.cc
r538 r660 65 65 std::cout << "Connection failed" << std::endl; 66 66 67 ENetPacket *packet; 67 ENetPacket *packet; //FIXME: unused var! 68 68 ENetEvent event; 69 69
Note: See TracChangeset
for help on using the changeset viewer.