Index: branches/network/src/lib/network/netdefs.h
===================================================================
--- branches/network/src/lib/network/netdefs.h	(revision 7395)
+++ branches/network/src/lib/network/netdefs.h	(revision 7402)
@@ -28,4 +28,9 @@
 } NodeType;
 
+typedef enum ConnectionType {
+  NET_UDP = 0,
+  NET_TCP
+};
+
 
 typedef enum {
Index: branches/network/src/lib/network/server_socket.cc
===================================================================
--- branches/network/src/lib/network/server_socket.cc	(revision 7395)
+++ branches/network/src/lib/network/server_socket.cc	(revision 7402)
@@ -26,14 +26,34 @@
 #include "debug.h"
 
-ServerSocket::ServerSocket(  )
+
+ServerSocket::ServerSocket( ConnectionType connectionType )
 {
+  this->connectionType = connectionType;
   init();
 }
 
-ServerSocket::ServerSocket( unsigned int port )
+
+ServerSocket::ServerSocket( ConnectionType connectionType, unsigned int port )
 {
+  this->connectionType = connectionType;
   init();
   listen(port);
 }
+
+
+ServerSocket::ServerSocket()
+{
+  this->connectionType == NET_TCP;
+  init();
+}
+
+
+ServerSocket::ServerSocket( unsigned int port )
+{
+  this->connectionType == NET_TCP;
+  init();
+  listen(port);
+}
+
 
 /**
@@ -49,4 +69,7 @@
   _isListening = false;
 }
+
+
+
 
 void ServerSocket::init( )
@@ -97,12 +120,21 @@
   }
 
-  listenSocket = SDLNet_TCP_Open(&ip);
-
-  if (!listenSocket)
+  if( this->connectionType == NET_TCP)
   {
-    PRINTF(1)("SDLNet_TCP_Open: %s\n", SDLNet_GetError());
+    listenSocketTCP = SDLNet_TCP_Open(&ip);
+    if( !listenSocketTCP) {
+      PRINTF(1)("SDLNet_TCP_Open: %s\n", SDLNet_GetError());
+      _isListening = false;
+      return false;
+    }
+  }
+  else
+  {
+    listenSocketUDP = SDLNet_UDP_Open(port);
+    PRINTF(1)("SDLNet_UDP_Open: %s\n", SDLNet_GetError());
     _isListening = false;
     return false;
   }
+
 
   return true;
@@ -110,4 +142,8 @@
 
 
+/**
+ *  returns a new NetworkSocket
+ * @return new socket
+ */
 NetworkSocket* ServerSocket::getNewSocket( )
 {
@@ -119,16 +155,28 @@
   }
 
-  TCPsocket sock = SDLNet_TCP_Accept(listenSocket);
-
-  if ( !sock )
+  if( this->connectionType == NET_TCP)
   {
-    return NULL;
+    TCPsocket sockTCP = SDLNet_TCP_Accept(this->listenSocketTCP);
+    if( !sockTCP)
+      return NULL;
+    else
+      return new NetworkSocket(sockTCP);
   }
   else
   {
-    return new NetworkSocket(sock);
+#warning UDP getNewSocket incomplet
+//     UDPsocket sockUDP = SDLNet_UDP_Accept(this->listenSocketUDP);
+//     if( !sockUDP)
+//       return NULL;
+
+//     else
+//       return new NetworkSocket();
   }
 }
 
+
+/**
+ * closes the ServerSocket
+ */
 void ServerSocket::close( )
 {
Index: branches/network/src/lib/network/server_socket.h
===================================================================
--- branches/network/src/lib/network/server_socket.h	(revision 7395)
+++ branches/network/src/lib/network/server_socket.h	(revision 7402)
@@ -24,22 +24,38 @@
 #define _MSECONDS_SLEEP_LISTEN 100
 
+
 class ServerSocket : public BaseObject
 {
-  private:
-    TCPsocket listenSocket;
-    bool terminateThread;
+  public:
+#warning old socket structure
+    ServerSocket();
+    ServerSocket(unsigned int port);
 
-    bool _isListening;
+    ServerSocket(ConnectionType connectionType);
+    ServerSocket(ConnectionType connectionType, unsigned int port );
+    virtual ~ServerSocket();
 
-    void init();
-
-  public:
-    ServerSocket();
-    ServerSocket( unsigned int port );
-    virtual ~ServerSocket();
     bool listen( unsigned int port );
     NetworkSocket* getNewSocket( void );
     void close();
     inline bool isOk(){ return listenSocket!=NULL; }
+
+
+  private:
+    void init();
+
+
+  private:
+#warning old socket structure
+    TCPsocket         listenSocket;
+
+    ConnectionType    connectionType;                        //!< the connection type of the socket {TCP,UDP}
+    TCPsocket         listenSocketTCP;                       //!< tcp socket
+    UDPsocket         listenSocketUDP;                       //!< udp socket
+    bool              terminateThread;                       //!< true if thread terminated
+
+    bool              _isListening;                          //!< true if listening
+
+
 };
 
