Changeset 441
- Timestamp:
- Dec 9, 2007, 5:45:12 PM (17 years ago)
- Location:
- code/branches/FICN/src/network
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/network/CMakeLists.txt
r440 r441 1 1 PROJECT(Orxonox) 2 3 SET( CHATCLIENT_SRC_FILES 4 dummyclient3.cc 5 ) 6 SET( CHATSERVER_SRC_FILES 7 dummyserver3.cc 8 ) 9 10 2 11 3 12 SET( NETWORK_SRC_FILES … … 18 27 ADD_LIBRARY(network SHARED ${NETWORK_SRC_FILES}) 19 28 TARGET_LINK_LIBRARIES(network ${ENet_LIBRARY} ${Boost_thread_LIBRARIES}) 29 30 ADD_EXECUTABLE(chatserver ${CHATSERVER_SRC_FILES}) 31 TARGET_LINK_LIBRARIES( chatserver 32 ${OGRE_LIBRARIES} 33 ${OIS_LIBRARIES} 34 network 35 core 36 objects 37 ) 38 39 ADD_EXECUTABLE(chatclient ${CHATCLIENT_SRC_FILES}) 40 TARGET_LINK_LIBRARIES( chatclient 41 ${OGRE_LIBRARIES} 42 ${OIS_LIBRARIES} 43 network 44 core 45 objects 46 ) 47 48 ADD_EXECUTABLE(client dummyclient2.cc) 49 ADD_EXECUTABLE(server dummyserver.cc) 50 TARGET_LINK_LIBRARIES( client 51 ${OGRE_LIBRARIES} 52 ${OIS_LIBRARIES} 53 network 54 core 55 objects 56 ) 57 TARGET_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 6 6 7 7 # Link command: 8 server: PacketBuffer.o ConnectionManager.o dummyserver.o PacketDecoder.o PacketGenerator.o 9 ${CC} PacketDecoder.o PacketGenerator.o C onnectionManager.o dummyserver.o PacketBuffer.o -o server -lenet -lboost_thread -g8 server: 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 10 10 11 11 dummyserver.o: dummyserver.cc -
code/branches/FICN/src/network/dummyclient2.cc
r337 r441 47 47 std::cout << "failed sending" << std::endl; 48 48 } 49 //usleep(100000);49 usleep(1000000); 50 50 } 51 51 -
code/branches/FICN/src/network/dummyclient3.cc
r438 r441 8 8 int main(){ 9 9 network::PacketGenerator pck; 10 const int PORT = 55556 10 const int PORT = 55556; 11 11 std::cout << "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << std::endl; 12 12 std::string str; … … 18 18 Client client( str, PORT ); 19 19 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; 22 22 23 23 while (true) { 24 24 client.update(); 25 cout << "your message: ";26 getline(cin, str );25 std::cout << "your message: "; 26 std::getline( std::cin, str ); 27 27 client.sendChat( str ); 28 28 } -
code/branches/FICN/src/network/dummyserver.cc
r367 r441 9 9 #include "ConnectionManager.h" 10 10 #include "PacketManager.h" 11 #include "ClientInformation.h" 11 12 12 13 #ifdef WIN32 … … 21 22 22 23 int main(){ 23 ConnectionManager server = ConnectionManager();24 24 bool quit=false; 25 25 ENetPacket *packet; 26 ClientInformation clients; 27 ConnectionManager server = ConnectionManager(&clients); 26 28 server.createListener(); 27 29 -
code/branches/FICN/src/network/dummyserver3.cc
r440 r441 39 39 } 40 40 41 int main(int argc, char *argv[]){ 42 dummyserver3 server; 43 server.loop(); 44 return 0; 41 45 42 } 46 43 47 44 int main(int argc, char **argv[]){ 45 network::dummyserver3 server; 46 server.loop(); 47 return 0; 48 48 }
Note: See TracChangeset
for help on using the changeset viewer.