Index: code/branches/FICN/src/network/CMakeLists.txt
===================================================================
--- code/branches/FICN/src/network/CMakeLists.txt	(revision 446)
+++ code/branches/FICN/src/network/CMakeLists.txt	(revision 448)
@@ -2,7 +2,17 @@
 
 SET( CHATCLIENT_SRC_FILES
+  ClientConnection.cc
+  Client.cc
+  PacketBuffer.cc
+  PacketDecoder.cc
+  PacketGenerator.cc
   dummyclient3.cc
 )
 SET( CHATSERVER_SRC_FILES
+  ConnectionManager.cc
+  GameStateManager.cc
+  PacketBuffer.cc
+  PacketDecoder.cc
+  PacketGenerator.cc
   dummyserver3.cc
 )
Index: code/branches/FICN/src/network/Client.cc
===================================================================
--- code/branches/FICN/src/network/Client.cc	(revision 446)
+++ code/branches/FICN/src/network/Client.cc	(revision 448)
@@ -100,8 +100,8 @@
     if(!isConnected)
       return false;
-    if(!client_connection.addPacket(pck_gen.chatMessage( message.c_str() )));
-        return false;
+    if(client_connection.addPacket(pck_gen.chatMessage( message.c_str() )));
+      return client_connection.sendPackets();
     // send packets
-    return client_connection.sendPackets();
+    return false;
   }
 
Index: code/branches/FICN/src/network/ClientConnection.cc
===================================================================
--- code/branches/FICN/src/network/ClientConnection.cc	(revision 446)
+++ code/branches/FICN/src/network/ClientConnection.cc	(revision 448)
@@ -82,6 +82,5 @@
     if(enet_peer_send(server, 1, packet)!=0)
       return false;
-    else
-      return true;
+    return true;
   }
 
@@ -89,6 +88,6 @@
     if(server==NULL)
       return false;
-    if(enet_host_service(client, event, NETWORK_SEND_WAIT)>=0)
-      return true;
+    if(enet_host_service(client, event, NETWORK_SEND_WAIT)>=0){
+      return true;}
     else
       return false;
@@ -99,6 +98,6 @@
     if(server==NULL)
       return false;
-    if(enet_host_service(client, &event, NETWORK_SEND_WAIT)>=0)
-      return true;
+    if(enet_host_service(client, &event, NETWORK_SEND_WAIT)>=0){
+      return true;}
     else
       return false;
@@ -130,4 +129,5 @@
       case ENET_EVENT_TYPE_CONNECT:
       case ENET_EVENT_TYPE_RECEIVE:
+        std::cout << "got packet" << std::endl;
         processData(&event);
         break;
Index: code/branches/FICN/src/network/dummyclient3.cc
===================================================================
--- code/branches/FICN/src/network/dummyclient3.cc	(revision 446)
+++ code/branches/FICN/src/network/dummyclient3.cc	(revision 448)
@@ -6,5 +6,6 @@
 using namespace network;
 
-int main(){
+void sender(){
+
   network::PacketGenerator pck;
   const int PORT = 55556;
@@ -15,16 +16,56 @@
   if(str.compare("")==0)
     str="127.0.0.1";
-  
+
   Client client( str, PORT );
   if ( client.establishConnection() )
-	  std::cout << "connection established" << std::endl;
+          std::cout << "connection established" << std::endl;
   else std::cout << "problems establishing connection" << std::endl;
-  
+
   while (true) {
-	  client.update();
-	  std::cout << "your message: ";
-	  std::getline( std::cin, str );
-	  client.sendChat( str );
-	  std::cout << "send message" << std::endl;
+          client.update();
+          std::cout << "your message: ";
+          std::getline( std::cin, str );
+          client.sendChat( str );
+          std::cout << "send message" << std::endl;
   }
+
+
+
 }
+
+void listener(){
+
+  const int PORT = 55556;
+  std::cout << "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << std::endl;
+  std::string str;
+  std::getline(std::cin, str);
+  std::cout << "You entered: " << str << std::endl;
+  if(str.compare("")==0)
+    str="127.0.0.1";
+
+  Client client( str, PORT );
+  if ( client.establishConnection() )
+          std::cout << "connection established" << std::endl;
+  else std::cout << "problems establishing connection" << std::endl;
+
+  while (true) {
+          client.update();
+          usleep(100);
+  }
+
+
+
+}
+
+
+int main(int argc, char **argv[]){
+  std::string in;
+  std::cout << "Please choose: sender(s) oder listener(l)" << std::endl;
+  std::getline(std::cin, in);
+  if(in.compare("l")==0)
+    listener();
+  else if(in.compare("s")==0)
+    sender();
+  else
+    std::cout << "wrong answer" << std::endl;
+}
