Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 442 for code/branches


Ignore:
Timestamp:
Dec 9, 2007, 6:01:24 PM (17 years ago)
Author:
scheusso
Message:

still problems with chatserver/client

Location:
code/branches/FICN/src/network
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/ClientInformation.cc

    r436 r442  
    5858
    5959ClientInformation *ClientInformation::next(){
    60   return this->nexte;
     60  if(this!=0)
     61    return this->nexte;
     62  else
     63    return 0;
    6164}
    6265ClientInformation *ClientInformation::prev(){
    63   return this->preve;
     66  if(this!=0)
     67    return this->preve;
     68  else
     69    return 0;
    6470}
    6571
  • code/branches/FICN/src/network/ConnectionManager.cc

    r436 r442  
    198198  bool ConnectionManager::addClient(ENetEvent *event){
    199199    ClientInformation *temp = head_->insertBack(new ClientInformation);
    200     temp->setID(temp->prev()->getID());
     200    temp->setID(temp->prev()->getID()+1);
    201201    temp->setPeer(event->peer);
     202    std::cout << "added client id: " << temp->prev()->getID() << std::endl;
    202203    return true;
    203204  }
  • code/branches/FICN/src/network/Server.cc

    r436 r442  
    7474  bool Server::sendMSG(std::string msg){
    7575    ENetPacket *packet = packet_gen.chatMessage(msg.c_str());
     76    std::cout <<"adding packets" << std::endl;
    7677    connection->addPacketAll(packet);
     78    std::cout <<"added packets" << std::endl;
    7779    return connection->sendPackets();
    7880  }
     
    8486  bool Server::sendMSG(const char *msg){
    8587    ENetPacket *packet = packet_gen.chatMessage(msg);
     88    std::cout <<"adding packets" << std::endl;
    8689    connection->addPacketAll(packet);
     90    std::cout <<"added packets" << std::endl;
    8791    return connection->sendPackets();
    8892  }
  • code/branches/FICN/src/network/dummyclient2.cc

    r441 r442  
    4747      std::cout << "failed sending" << std::endl;
    4848    }
    49     usleep(1000000);
     49//    usleep(1000000);
    5050  }
    5151
  • code/branches/FICN/src/network/dummyserver.cc

    r441 r442  
    3333    if(server.queueEmpty())
    3434// Warning: usleep(100) is Sleep(100/1000) = Sleep(0), which is nothing!
    35       usleep(100);
     35      usleep(10000000);
    3636    else{
    3737      ENetAddress addr;
Note: See TracChangeset for help on using the changeset viewer.