Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 441


Ignore:
Timestamp:
Dec 9, 2007, 5:45:12 PM (17 years ago)
Author:
scheusso
Message:

some cmake hacking, some testing

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

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/CMakeLists.txt

    r440 r441  
    11PROJECT(Orxonox)
     2
     3SET( CHATCLIENT_SRC_FILES
     4  dummyclient3.cc
     5)
     6SET( CHATSERVER_SRC_FILES
     7  dummyserver3.cc
     8)
     9
     10
    211
    312SET( NETWORK_SRC_FILES
     
    1827ADD_LIBRARY(network SHARED ${NETWORK_SRC_FILES})
    1928TARGET_LINK_LIBRARIES(network ${ENet_LIBRARY} ${Boost_thread_LIBRARIES})
     29
     30ADD_EXECUTABLE(chatserver ${CHATSERVER_SRC_FILES})
     31TARGET_LINK_LIBRARIES( chatserver
     32  ${OGRE_LIBRARIES}
     33  ${OIS_LIBRARIES}
     34  network
     35  core
     36  objects
     37)
     38
     39ADD_EXECUTABLE(chatclient ${CHATCLIENT_SRC_FILES})
     40TARGET_LINK_LIBRARIES( chatclient
     41  ${OGRE_LIBRARIES}
     42  ${OIS_LIBRARIES}
     43  network
     44  core
     45  objects
     46)
     47
     48ADD_EXECUTABLE(client dummyclient2.cc)
     49ADD_EXECUTABLE(server dummyserver.cc)
     50TARGET_LINK_LIBRARIES( client
     51  ${OGRE_LIBRARIES}
     52  ${OIS_LIBRARIES}
     53  network
     54  core
     55  objects
     56)
     57TARGET_LINK_LIBRARIES( server
     58  ${OGRE_LIBRARIES}
     59  ${OIS_LIBRARIES}
     60  network
     61  core
     62  objects
     63)
     64
  • code/branches/FICN/src/network/Makefile.test

    r440 r441  
    66
    77# Link command:
    8 server: PacketBuffer.o ConnectionManager.o dummyserver.o PacketDecoder.o PacketGenerator.o
    9         ${CC} PacketDecoder.o PacketGenerator.o ConnectionManager.o dummyserver.o PacketBuffer.o -o server -lenet -lboost_thread -g
     8server: PacketBuffer.o ConnectionManager.o dummyserver.o PacketDecoder.o PacketGenerator.o ClientInformation.o
     9        ${CC} PacketDecoder.o PacketGenerator.o ClientInformation.o ConnectionManager.o dummyserver.o PacketBuffer.o -o server -lenet -lboost_thread -g
    1010
    1111dummyserver.o: dummyserver.cc
  • code/branches/FICN/src/network/dummyclient2.cc

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

    r438 r441  
    88int main(){
    99  network::PacketGenerator pck;
    10   const int PORT = 55556
     10  const int PORT = 55556;
    1111  std::cout << "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << std::endl;
    1212  std::string str;
     
    1818  Client client( str, PORT );
    1919  if ( client.establishConnection() )
    20           cout << "connection established" << endl;
    21   else cout << "problems establishing connection" << endl;
     20          std::cout << "connection established" << std::endl;
     21  else std::cout << "problems establishing connection" << std::endl;
    2222 
    2323  while (true) {
    2424          client.update();
    25           cout << "your message: ";
    26           getline( cin, str );
     25          std::cout << "your message: ";
     26          std::getline( std::cin, str );
    2727          client.sendChat( str );
    2828  }
  • code/branches/FICN/src/network/dummyserver.cc

    r367 r441  
    99#include "ConnectionManager.h"
    1010#include "PacketManager.h"
     11#include "ClientInformation.h"
    1112
    1213#ifdef WIN32
     
    2122
    2223int main(){
    23   ConnectionManager server = ConnectionManager();
    2424  bool quit=false;
    2525  ENetPacket *packet;
     26  ClientInformation clients;
     27  ConnectionManager server = ConnectionManager(&clients);
    2628  server.createListener();
    2729
  • code/branches/FICN/src/network/dummyserver3.cc

    r440 r441  
    3939}
    4040
    41 int main(int argc, char *argv[]){
    42   dummyserver3 server;
    43   server.loop();
    44   return 0;
     41
    4542}
    4643
    47 
     44int main(int argc, char **argv[]){
     45  network::dummyserver3 server;
     46  server.loop();
     47  return 0; 
    4848}
Note: See TracChangeset for help on using the changeset viewer.