Index: /osgVisual/include/cluster/dataIO_cluster.h
===================================================================
--- /osgVisual/include/cluster/dataIO_cluster.h	(revision 66)
+++ /osgVisual/include/cluster/dataIO_cluster.h	(revision 67)
@@ -117,4 +117,8 @@
 
 protected:
+	osgVisual::dataIO_cluster::clustermode clusterMode;	// This variable only mirrors the variable of dataIO. willbe set during initialize.
+	bool initialized;
+	int port;
+
 	osg::ref_ptr<osgVisual::dataIO_transportContainer> sendContainer;
 };
Index: /osgVisual/include/cluster/dataIO_clusterAsioTcpIostream.h
===================================================================
--- /osgVisual/include/cluster/dataIO_clusterAsioTcpIostream.h	(revision 66)
+++ /osgVisual/include/cluster/dataIO_clusterAsioTcpIostream.h	(revision 67)
@@ -60,8 +60,4 @@
 
 private:
-	osgVisual::dataIO_cluster::clustermode clusterMode;
-	bool initialized;
-	int port;	// Defaults to 5678 
-	
 	/**
 	 * This list contains the connections to communicate with in each frame. 
Index: /osgVisual/include/cluster/dataIO_clusterENet.h
===================================================================
--- /osgVisual/include/cluster/dataIO_clusterENet.h	(revision 66)
+++ /osgVisual/include/cluster/dataIO_clusterENet.h	(revision 67)
@@ -52,4 +52,6 @@
 private:
 	osg::ref_ptr<osgVisual::dataIO_clusterENet_implementation> enet_impl;
+	std::string serverToConnect;
+	osgVisual::dataIO_cluster::clustermode clusterMode;
 };
 
Index: /osgVisual/include/core/visual_core.h
===================================================================
--- /osgVisual/include/core/visual_core.h	(revision 66)
+++ /osgVisual/include/core/visual_core.h	(revision 67)
@@ -98,5 +98,4 @@
 
 	void addManipulators();
-	void processCommandlineArguments();
 	bool loadTerrain(osg::ArgumentParser& arguments_);
 	bool checkCommandlineArgumentsForFinalErrors();
Index: /osgVisual/src/cluster/dataIO_clusterENet.cpp
===================================================================
--- /osgVisual/src/cluster/dataIO_clusterENet.cpp	(revision 66)
+++ /osgVisual/src/cluster/dataIO_clusterENet.cpp	(revision 67)
@@ -22,5 +22,7 @@
 {
 	OSG_NOTIFY( osg::ALWAYS ) << "clusterENet constructed" << std::endl;
+	serverToConnect = "unknown";
 }
+
 
 dataIO_clusterENet::~dataIO_clusterENet(void)
@@ -29,13 +31,59 @@
 }
 
+
 void dataIO_clusterENet::init( osg::ArgumentParser& arguments_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ )
 {
 	OSG_NOTIFY( osg::ALWAYS ) << "clusterENet init();" << std::endl;
 	
+	// Configure the clustermode
+	clusterMode = clusterMode_;
+
+	// store sendContainer
 	sendContainer = sendContainer_;
 	
 	// create ENet implementation object.
 	enet_impl = new osgVisual::dataIO_clusterENet_implementation();
+
+	// initialize ENet implementation
+	if(clusterMode == MASTER)
+	{
+		enet_impl->init(dataIO_clusterENet_implementation::SERVER, port);
+
+		initialized = true;
+	}
+	if(clusterMode == SLAVE)
+	{
+		// Get the server IP
+		if(!arguments_.read("--server",serverToConnect, port))
+		{
+			// try server discovery
+			//discoverServer(serverToConnect,port);
+			/* todo : implement a udp server discovery based on ASIO */
+		}
+
+		// Init ENet
+		enet_impl->init(dataIO_clusterENet_implementation::CLIENT, port);
+
+		// Connect to server with 5 retries:
+		bool connected = false;
+		for(int i=0; i<5; i++)
+		{
+			std::cout << "Try to connect to server " << serverToConnect << std::endl;
+			if( enet_impl->connectTo( serverToConnect.c_str(), 5000 ) )
+			{
+				// Connect successful.
+				initialized = true;
+				connected = true;
+				break;
+			}
+		}	// For END
+		if(!connected)
+		{
+			initialized = false;
+			std::cout << "Failed to establish connection to server " << serverToConnect << std::endl;
+		}
+	}	// IF SLAVE END
 }
+
 
 void dataIO_clusterENet::shutdown()
@@ -43,4 +91,5 @@
 	OSG_NOTIFY( osg::ALWAYS ) << "clusterENet shutdown();" << std::endl;
 }
+
 
 bool dataIO_clusterENet::sendTO_OBJvaluesToSlaves()
@@ -51,4 +100,5 @@
 }
 
+
 bool dataIO_clusterENet::readTO_OBJvaluesFromMaster()
 {
@@ -57,4 +107,5 @@
 	return true;
 }
+
 
 void dataIO_clusterENet::reportAsReadyToSwap()
@@ -70,4 +121,5 @@
 }
 
+
 bool dataIO_clusterENet::waitForAllReadyToSwap()
 {
@@ -77,4 +129,5 @@
 }
 
+
 bool dataIO_clusterENet::sendSwapCommand()
 {
Index: /osgVisual/src/cluster/dataIO_clusterENet_implementation.cpp
===================================================================
--- /osgVisual/src/cluster/dataIO_clusterENet_implementation.cpp	(revision 66)
+++ /osgVisual/src/cluster/dataIO_clusterENet_implementation.cpp	(revision 67)
@@ -9,4 +9,5 @@
 	std::cout << "Instantiated server class# "<< activeENetInstances << std::endl;
 	serverInitialized = false;
+	host = NULL;
 	// Start ENet
 	if (activeENetInstances++ == 0)
@@ -25,6 +26,7 @@
 dataIO_clusterENet_implementation::~dataIO_clusterENet_implementation()
 {
-	// Delete Host Object
-	enet_host_destroy(host);
+	// Delete Host Object if instantiated
+	if(host)
+		enet_host_destroy(host);
 
 	// Stop ENet if it is the last element.
Index: /osgVisual/src/core/visual_core.cpp
===================================================================
--- /osgVisual/src/core/visual_core.cpp	(revision 66)
+++ /osgVisual/src/core/visual_core.cpp	(revision 67)
@@ -56,7 +56,4 @@
 	OSG_NOTIFY( osg::ALWAYS ) << "Initialize visual_core..." << std::endl;
 
-	// Process commandline arguments for configuration parameter
-	processCommandlineArguments();
-	
 	// Add manipulators for user interaction
 	addManipulators();
@@ -250,8 +247,7 @@
 }
 
-void visual_core::processCommandlineArguments()
-{
-	std::cout << "Processing general commandline arguments..." << std::endl;
-
+
+bool visual_core::checkCommandlineArgumentsForFinalErrors()
+{
 	// Setup Application Usage
 	arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
@@ -275,8 +271,5 @@
         viewer->setDone(true);
     }
-}
-
-bool visual_core::checkCommandlineArgumentsForFinalErrors()
-{
+
 	 // any option left unread are converted into errors to write out later.
     arguments.reportRemainingOptionsAsUnrecognized();
Index: /osgVisual/src/dataIO/visual_dataIO.cpp
===================================================================
--- /osgVisual/src/dataIO/visual_dataIO.cpp	(revision 66)
+++ /osgVisual/src/dataIO/visual_dataIO.cpp	(revision 67)
@@ -56,6 +56,5 @@
 		OSG_NOTIFY( osg::ALWAYS ) << "Configure osgVisual as SLAVE" << std::endl;
 		clusterMode = osgVisual::dataIO_cluster::SLAVE;
-		// Slave only recieves container, therefor set this Pointer null.
-		slotContainer = NULL;
+		slotContainer = NULL;	// Slave only recieves container, therefor set this Pointer null.
 	}
 	else
