Index: /code/branches/FICN/src/network/Client.cc
===================================================================
--- /code/branches/FICN/src/network/Client.cc	(revision 631)
+++ /code/branches/FICN/src/network/Client.cc	(revision 632)
@@ -183,4 +183,5 @@
     while(!(client_connection.queueEmpty())){
       packet = client_connection.getPacket();
+      //std::cout << "tick packet size " << packet->dataLength << std::endl;
       elaborate(packet, 0); // ================= i guess we got to change this .... (client_ID is always same = server)
     }
Index: /code/branches/FICN/src/network/ClientConnection.cc
===================================================================
--- /code/branches/FICN/src/network/ClientConnection.cc	(revision 631)
+++ /code/branches/FICN/src/network/ClientConnection.cc	(revision 632)
@@ -75,8 +75,11 @@
 
   ENetPacket *ClientConnection::getPacket(ENetAddress &address){
-    if(!buffer.isEmpty())
+    if(!buffer.isEmpty()) {
+      //std::cout << "###BUFFER IS NOT EMPTY###" << std::endl;
       return buffer.pop(address);
-    else
+    }
+    else{
         return NULL;
+    }
   }
 
Index: /code/branches/FICN/src/network/GameStateClient.cc
===================================================================
--- /code/branches/FICN/src/network/GameStateClient.cc	(revision 631)
+++ /code/branches/FICN/src/network/GameStateClient.cc	(revision 632)
@@ -153,6 +153,8 @@
   int retval;
   uLongf length=normsize;
+  //std::cout << "gamestateclient" << std::endl;
+  //std::cout << "normsize " << a.normsize << " compsize " << a.compsize << " " << bufsize << std::endl;
   retval = uncompress( dest, &length, a.data, (uLong)compsize );
-
+  //std::cout << "length " << length << std::endl;
   switch ( retval ) {
     case Z_OK: std::cout << "successfully decompressed" << std::endl; break;
@@ -167,5 +169,5 @@
   gamestate.data = dest;
   gamestate.diffed = a.diffed;
-
+  
   return gamestate;
 }
Index: /code/branches/FICN/src/network/GameStateManager.cc
===================================================================
--- /code/branches/FICN/src/network/GameStateManager.cc	(revision 631)
+++ /code/branches/FICN/src/network/GameStateManager.cc	(revision 632)
@@ -109,7 +109,9 @@
     //get size of the synchronisable
     tempsize=it->getSize();
+    //std::cout << "size of temp gamestate: " << tempsize << std::endl;
     //COUT(2) << "size of synchronisable: " << tempsize << std::endl;
     // add place for data and 3 ints (length,classid,objectid)
     totalsize+=tempsize+3*sizeof(int);
+    //std::cout << "totalsize: " << totalsize << std::endl;
     // allocate additional space
     if(totalsize+tempsize>memsize){
@@ -188,5 +190,7 @@
   unsigned char* dest = (unsigned char*)malloc( buffer );
   int retval;
+  //std::cout << "before ziped " << buffer << std::endl;
   retval = compress( dest, &buffer, a->data, (uLong)size );
+  //std::cout << "after ziped " << buffer << std::endl;
 
   switch ( retval ) {
@@ -199,5 +203,7 @@
   GameStateCompressed compressedGamestate;
   compressedGamestate.compsize = buffer;
+  //std::cout << "compressedGamestate.compsize = buffer; " << buffer << std::endl;
   compressedGamestate.normsize = size;
+  //std::cout << "compressedGamestate.normsize = size; " << size << std::endl;
   compressedGamestate.id = a->id;
   compressedGamestate.data = dest;
Index: /code/branches/FICN/src/network/PacketBuffer.cc
===================================================================
--- /code/branches/FICN/src/network/PacketBuffer.cc	(revision 631)
+++ /code/branches/FICN/src/network/PacketBuffer.cc	(revision 632)
@@ -50,4 +50,5 @@
 bool PacketBuffer::push(ENetEvent *ev){
   boost::mutex::scoped_lock lock(networkPacketBufferMutex);
+  //std::cout << "event size inside packetbuffer " << ev->packet->dataLength << std::endl;
 //   if(closed)
 //     return false;
@@ -75,4 +76,5 @@
 ENetPacket *PacketBuffer::pop(){
   boost::mutex::scoped_lock lock(networkPacketBufferMutex);
+  //std::cout << "packetbuffer pop" << std::endl;
   if(first!=NULL /*&& !closed*/){
     QueueItem *temp = first;
@@ -82,6 +84,8 @@
     first = first->next;
     delete temp;
+    //std::cout << "pop size of packet " << pck->dataLength << std::endl;
     return pck;
   } else{
+    //std::cout << "nothing to return" << std::endl;
     return NULL;
   }
@@ -90,4 +94,5 @@
 ENetPacket *PacketBuffer::pop(ENetAddress &address){
   boost::mutex::scoped_lock lock(networkPacketBufferMutex);
+  //std::cout << "packetbuffer pop(address)" << std::endl;
   if(first!=NULL /*&& !closed*/){
     QueueItem *temp = first;
@@ -98,4 +103,5 @@
     first = first->next;
     delete temp;
+    //std::cout << "pop(address) size of packet " << pck->dataLength << std::endl;
     return pck;
   } else{
Index: /code/branches/FICN/src/network/PacketDecoder.cc
===================================================================
--- /code/branches/FICN/src/network/PacketDecoder.cc	(revision 631)
+++ /code/branches/FICN/src/network/PacketDecoder.cc	(revision 632)
@@ -52,4 +52,6 @@
 	cout << "clientId: " << client << endl; //control cout, not important, just debugging info
 	int id = (int)*packet->data; //the first 4 bytes are always the enet packet id
+	std::cout << "packet id: " << id << std::endl;
+	std::cout << "packet size inside packetdecoder: " << packet->dataLength << std::endl;
 	switch( id ) {
 	case ACK:
@@ -145,34 +147,34 @@
 	unsigned char* data = (unsigned char*)packet->data;
 	//copy the GameStateCompressed id into the struct, which is located at second place data+sizeof( int )
-  //memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) );
-  currentState->id = (int)*(data+sizeof(int));
-  std::cout << "id: " << currentState->id << std::endl;
+  	//memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) );
+  	currentState->id = (int)*(data+sizeof(int));
+ 	 std::cout << "id: " << currentState->id << std::endl;
 	//copy the size of the GameStateCompressed compressed data into the new GameStateCompressed struct, located at 3th
 	//position of the data stream, data+2*sizeof( int )
-// 	memcpy( (void*)&(currentState->compsize), (const void*)(data+2*sizeof( int )), sizeof( int) );
-  currentState->compsize = (int)*(data+2*sizeof(int));
-  std::cout << "compsize: " << currentState->compsize << std::endl;
+	memcpy( (void*)&(currentState->compsize), (const void*)(data+2*sizeof( int )), sizeof( int) );
+  	//currentState->compsize = (int)*(data+2*sizeof(int));
+  	std::cout << "compsize: " << currentState->compsize << std::endl;
 	//size of uncompressed data
-// 	memcpy( (void*)&(currentState->normsize), (const void*)(data+3*sizeof( int )), sizeof( int ) );
-  currentState->normsize = (int)*(data+3*sizeof(int));
-  std::cout << "normsize. " << currentState->normsize << std::endl;
+	memcpy( (void*)&(currentState->normsize), (const void*)(data+3*sizeof( int )), sizeof( int ) );
+  	//currentState->normsize = (int)*(data+3*sizeof(int));
+  	std::cout << "normsize. " << currentState->normsize << std::endl;
 	//since the packetgenerator was changed, due to a new parameter, change this function too
-// 	memcpy( (void*)&(currentState->diffed), (const void*)(data+4*sizeof(int)), sizeof(bool));
-  currentState->diffed = (bool)*(data+4*sizeof(int));
-  std::cout << "diffed: " << currentState->diffed << std::endl;
+	memcpy( (void*)&(currentState->diffed), (const void*)(data+4*sizeof(int)), sizeof(bool));
+  	//currentState->diffed = (bool)*(data+4*sizeof(int));
+  	std::cout << "diffed: " << currentState->diffed << std::endl;
 	//since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream
 	currentState->data = (unsigned char*)(malloc( currentState->compsize ));
-  if(currentState->data==NULL)
-    std::cout << "memory leak" << std::endl;
+  	if(currentState->data==NULL)
+    		std::cout << "memory leak" << std::endl;
 	//copy the GameStateCompressed data
-  //std::cout << "packet size (enet): " << packet->dataLength << std::endl;
-  //std::cout << "totallen: " << 4*sizeof(int)+sizeof(bool)+currentState->compsize << std::endl;
+  	//std::cout << "packet size (enet): " << packet->dataLength << std::endl;
+  	//std::cout << "totallen: " << 4*sizeof(int)+sizeof(bool)+currentState->compsize << std::endl;
 	memcpy( (void*)(currentState->data), (const void*)(data+4*sizeof( int ) + sizeof(bool)), currentState->compsize );
 
 	//clean memory
 	enet_packet_destroy( packet );
-  //run processGameStateCompressed
-  //TODO: not yet implemented!
-  processGamestate(currentState);
+  	//run processGameStateCompressed
+  	//TODO: not yet implemented!
+  	processGamestate(currentState);
 }
 
Index: /code/branches/FICN/src/network/PacketGenerator.cc
===================================================================
--- /code/branches/FICN/src/network/PacketGenerator.cc	(revision 631)
+++ /code/branches/FICN/src/network/PacketGenerator.cc	(revision 632)
@@ -98,7 +98,11 @@
 ENetPacket* PacketGenerator::gstate( GameStateCompressed* states, int reliable )
 {
-	int gid = GAMESTATE; //first assign the correct enet id
-	int totalLen = 4*sizeof( int ) + sizeof(bool) + states->compsize; //calculate the total size of the datastream memory
-	unsigned char *data = (unsigned char*)malloc( totalLen ); //allocate the memory for datastream
+  //std::cout << "packetgenerator" << std::endl;
+  //std::cout << "states->normsize " << states->normsize << std::endl;
+  //std::cout << "states->compsize " << states->compsize << std::endl;
+  int gid = GAMESTATE; //first assign the correct enet id
+  int totalLen = 4*sizeof( int ) + sizeof(bool) + states->compsize; //calculate the total size of the datastream memory
+  //std::cout << "totalLen " << totalLen << std::endl;
+  unsigned char *data = (unsigned char*)malloc( totalLen ); //allocate the memory for datastream
   memcpy( (void*)(data), (const void*)&gid, sizeof( int ) ); //this is the enet id
   memcpy( (void*)(data+sizeof(int)), (const void*)&(states->id), sizeof(int) ); //the GameStateCompressed id
@@ -107,17 +111,17 @@
   memcpy( (void*)(data+4*sizeof(int)), (const void*)&(states->diffed), sizeof(bool));
   /*(int)*(data) = gid;
-	(int)*(data+sizeof(int)) = states->id;
+  (int)*(data+sizeof(int)) = states->id;
   //this is the compressed size of the GameStateCompressed data, place at 3th position of the enet datastream
   (int)*(data+2*sizeof(int)) = states->compsize;
-	//this is the uncompressed size of GameStateCompressed data
+  //this is the uncompressed size of GameStateCompressed data
   (int)*(data+3*sizeof(int)) = states->normsize;
-	//since there is a new parameter inside GameStateCompressed, change this function to create packet
+  //since there is a new parameter inside GameStateCompressed, change this function to create packet
   (bool)*(data+4*sizeof(int)) = states->diffed;*/
-	//place the GameStateCompressed data at the end of the enet datastream
-	memcpy( (void*)(data+4*sizeof( int ) + sizeof(bool)), (const void*)states->data, states->compsize );
-	//create an enet packet with the generated bytestream
-	ENetPacket *packet = enet_packet_create( data , totalLen, reliable );
+  //place the GameStateCompressed data at the end of the enet datastream
+  memcpy( (void*)(data+4*sizeof( int ) + sizeof(bool)), (const void*)states->data, states->compsize );
+  //create an enet packet with the generated bytestream
+  ENetPacket *packet = enet_packet_create( data , totalLen, reliable );
   //delete data;
-	return packet;
+  return packet;
 }
 
Index: /code/branches/FICN/src/network/Server.cc
===================================================================
--- /code/branches/FICN/src/network/Server.cc	(revision 631)
+++ /code/branches/FICN/src/network/Server.cc	(revision 632)
@@ -86,9 +86,9 @@
   bool Server::sendMSG(const char *msg){
     ENetPacket *packet = packet_gen.chatMessage(msg);
-    std::cout <<"adding PPPPPackets" << std::endl;
+    std::cout <<"adding Packets" << std::endl;
     connection->addPacketAll(packet);
     //std::cout <<"added packets" << std::endl;
     if (connection->sendPackets()){
-	std::cout << "SSSSSucessfully" << std::endl;
+	std::cout << "Sucessfully" << std::endl;
 	return true;
     }
Index: /code/branches/FICN/src/network/dummyclient3.cc
===================================================================
--- /code/branches/FICN/src/network/dummyclient3.cc	(revision 631)
+++ /code/branches/FICN/src/network/dummyclient3.cc	(revision 632)
@@ -28,11 +28,18 @@
           std::cout << "connection established" << std::endl;
   else std::cout << "problems establishing connection" << std::endl;
-
+  char message[10000];
+  char signs[] = "abcdefghijklmnopqrstuvwxy";
   while (true) {
           client.tick(0);
-          std::cout << "your message: ";
-          std::getline( std::cin, str );
-          client.sendChat( str );
-          std::cout << "sent message" << std::endl;
+	  
+          std::cout << "your message2: ";
+	  for ( int i=0; i<9999; i++ ) {
+	    message[i] = signs[0];
+ 	  }
+	  message[9999] = 'z';
+	  std::string str( message );
+	  client.sendChat( str );
+          std::cout << str << std::endl;
+	  std::cin.get(); std::cin.get();
   }
 
