Changeset 442 for code/branches/FICN/src/network
- Timestamp:
- Dec 9, 2007, 6:01:24 PM (17 years ago)
- Location:
- code/branches/FICN/src/network
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/network/ClientInformation.cc
r436 r442 58 58 59 59 ClientInformation *ClientInformation::next(){ 60 return this->nexte; 60 if(this!=0) 61 return this->nexte; 62 else 63 return 0; 61 64 } 62 65 ClientInformation *ClientInformation::prev(){ 63 return this->preve; 66 if(this!=0) 67 return this->preve; 68 else 69 return 0; 64 70 } 65 71 -
code/branches/FICN/src/network/ConnectionManager.cc
r436 r442 198 198 bool ConnectionManager::addClient(ENetEvent *event){ 199 199 ClientInformation *temp = head_->insertBack(new ClientInformation); 200 temp->setID(temp->prev()->getID() );200 temp->setID(temp->prev()->getID()+1); 201 201 temp->setPeer(event->peer); 202 std::cout << "added client id: " << temp->prev()->getID() << std::endl; 202 203 return true; 203 204 } -
code/branches/FICN/src/network/Server.cc
r436 r442 74 74 bool Server::sendMSG(std::string msg){ 75 75 ENetPacket *packet = packet_gen.chatMessage(msg.c_str()); 76 std::cout <<"adding packets" << std::endl; 76 77 connection->addPacketAll(packet); 78 std::cout <<"added packets" << std::endl; 77 79 return connection->sendPackets(); 78 80 } … … 84 86 bool Server::sendMSG(const char *msg){ 85 87 ENetPacket *packet = packet_gen.chatMessage(msg); 88 std::cout <<"adding packets" << std::endl; 86 89 connection->addPacketAll(packet); 90 std::cout <<"added packets" << std::endl; 87 91 return connection->sendPackets(); 88 92 } -
code/branches/FICN/src/network/dummyclient2.cc
r441 r442 47 47 std::cout << "failed sending" << std::endl; 48 48 } 49 usleep(1000000);49 // usleep(1000000); 50 50 } 51 51 -
code/branches/FICN/src/network/dummyserver.cc
r441 r442 33 33 if(server.queueEmpty()) 34 34 // Warning: usleep(100) is Sleep(100/1000) = Sleep(0), which is nothing! 35 usleep(100 );35 usleep(10000000); 36 36 else{ 37 37 ENetAddress addr;
Note: See TracChangeset
for help on using the changeset viewer.