Index: /branches/thasling/DistributedGA/DistributedGA.ContactServer.Host/Program.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.ContactServer.Host/Program.cs	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.ContactServer.Host/Program.cs	(revision 13557)
@@ -1,48 +1,34 @@
 ﻿using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.ServiceModel;
-using System.ServiceModel.Description;
-using System.Text;
-using System.Threading.Tasks;
 
-namespace DistributedGA.ContactServer.Host
-{
-    class Program
-    {
-        static void Main(string[] args)
-        {
-            string baseAddress = string.Empty;
-            if(args.GetUpperBound(0) > -1)
-            {
-               baseAddress = args[0];
-            }
-            if (string.IsNullOrWhiteSpace(baseAddress))
-            {
-                baseAddress = "http://localhost:9090/DistributedGA.ContactServer/ContactService";
-            }
-            using (ServiceHost host = new ServiceHost(typeof(ContactServiceImpl), new Uri[] { new Uri(baseAddress) }))
-            {
-                // Enable metadata publishing.
-                ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
-                smb.HttpGetEnabled = true;
-                smb.MetadataExporter.PolicyVersion = PolicyVersion.Policy15;
-                host.Description.Behaviors.Add(smb);
+namespace DistributedGA.ContactServer.Host {
+  class Program {
+    static void Main(string[] args) {
+      string baseAddress = string.Empty;
+      if (args.GetUpperBound(0) > -1) {
+        baseAddress = args[0];
+      }
+      if (string.IsNullOrWhiteSpace(baseAddress)) {
+        baseAddress = "net.tcp://localhost:9090/DistributedGA.ContactServer/ContactService";
+      }
+      using (ServiceHost host = new ServiceHost(typeof(ContactServiceImpl), new Uri[] { new Uri(baseAddress) })) {
+        // Enable metadata publishing.
 
-                // Open the ServiceHost to start listening for messages. Since
-                // no endpoints are explicitly configured, the runtime will create
-                // one endpoint per base address for each service contract implemented
-                // by the service.
-                
-                host.Open();
 
-                Console.WriteLine("The service is ready at {0}", baseAddress);
-                Console.WriteLine("Press <Enter> to stop the service.");
-                Console.ReadLine();
+        // Open the ServiceHost to start listening for messages. Since
+        // no endpoints are explicitly configured, the runtime will create
+        // one endpoint per base address for each service contract implemented
+        // by the service.
 
-                // Close the ServiceHost.
-                host.Close();
-            }
-        }
+        host.Open();
+
+        Console.WriteLine("The service is ready at {0}", baseAddress);
+        Console.WriteLine("Press <Enter> to stop the service.");
+        Console.ReadLine();
+
+        // Close the ServiceHost.
+        host.Close();
+      }
     }
+  }
 }
Index: /branches/thasling/DistributedGA/DistributedGA.ContactServer/App.config
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.ContactServer/App.config	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.ContactServer/App.config	(revision 13557)
@@ -15,12 +15,15 @@
         <binding name="LargeObjects" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
       </basicHttpBinding>
+      <netTcpBinding>
+        <binding name="LargeObjects" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
+      </netTcpBinding>
     </bindings>
     <services>
       <service name="DistributedGA.ContactServer.ContactServiceImpl">
-        <endpoint bindingConfiguration="LargeObjects" address="ContactService" binding="basicHttpBinding" contract="DistributedGA.ContactServer.IContactService"/>
+        <endpoint bindingConfiguration="LargeObjects" address="ContactService" binding="netTcpBinding" contract="DistributedGA.ContactServer.IContactService"/>
         <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
         <host>
           <baseAddresses>
-            <add baseAddress="http://localhost:9090/DistributedGA.ContactServer" />
+            <add baseAddress="net.tcp://localhost:9090/DistributedGA.ContactServer" />
           </baseAddresses>
         </host>
Index: /branches/thasling/DistributedGA/DistributedGA.ContactServer/ContactServiceImpl.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.ContactServer/ContactServiceImpl.cs	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.ContactServer/ContactServiceImpl.cs	(revision 13557)
@@ -64,4 +64,5 @@
 
     private void UpdateHeartbeat(PeerInfo source) {
+      Console.WriteLine("hb from {0}:{1}", source.IpAddress, source.Port);
       DateTime now = DateTime.Now;
       allPeers.AddOrUpdate(source, now, (k, v) => v = now);
Index: /branches/thasling/DistributedGA/DistributedGA.Core.Host/App.config
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Core.Host/App.config	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.Core.Host/App.config	(revision 13557)
@@ -5,5 +5,5 @@
     </startup>
   <appSettings>
-    <add key="ContactServerURL" value="http://localhost:9090/DistributedGA.ContactServer/ContactService"/>
+    <add key="ContactServerURL" value="net.tcp://localhost:9090/DistributedGA.ContactServer/ContactService"/>
     <add key="LanIpPrefix" value="10."/>
   </appSettings>
Index: /branches/thasling/DistributedGA/DistributedGA.Core.Host/DistributedGA.Core.Host.csproj
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Core.Host/DistributedGA.Core.Host.csproj	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.Core.Host/DistributedGA.Core.Host.csproj	(revision 13557)
@@ -34,4 +34,5 @@
   <ItemGroup>
     <Reference Include="System" />
+    <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />
Index: /branches/thasling/DistributedGA/DistributedGA.Core.Host/Program.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Core.Host/Program.cs	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.Core.Host/Program.cs	(revision 13557)
@@ -1,3 +1,4 @@
 ﻿using System;
+using System.Configuration;
 using System.Threading;
 using DistributedGA.Core.Domain;
@@ -10,6 +11,10 @@
       try {
         Console.WriteLine("Starting peer...");
+        string ipPrefix = ConfigurationManager.AppSettings["LanIpPrefix"];
+        string serverUrl = ConfigurationManager.AppSettings["ContactServerURL"];
+
+
         IMessageHandler h = new PeerNetworkMessageHandler();
-        h.Init("","");
+        h.Init(ipPrefix, serverUrl);
         PeerInfo pi = h.GetPeerInfo();
         Console.WriteLine(string.Format("Peer is hostet at IP: {0} and port: {1}", pi.IpAddress, pi.Port));
Index: /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs	(revision 13557)
@@ -19,8 +19,8 @@
     private IMessageContract CreateServerClient(string ip, int port) {
       var serviceUrl = "DistributedGA.svc";
-      var baseUri = new Uri(string.Concat("http://", ip, ":", port, "/DistributedGA"));
+      var baseUri = new Uri(string.Concat("net.tcp://", ip, ":", port, "/DistributedGA"));
       var serviceUri = new Uri(baseUri, serviceUrl);
 
-      var binding = new BasicHttpBinding();
+      var binding = new NetTcpBinding();
       var endpoint = new EndpointAddress(serviceUri);
       var myChannelFactory = new ChannelFactory<IMessageContract>(binding, endpoint);
Index: /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageService.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageService.cs	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageService.cs	(revision 13557)
@@ -24,7 +24,7 @@
       var serviceUrl = "DistributedGA.svc";
       new Thread(() => {
-        var baseUri = new Uri(string.Concat("http://", ip, ":", port, "/DistributedGA"));
+        var baseUri = new Uri(string.Concat("net.tcp://", ip, ":", port, "/DistributedGA"));
         var serviceUri = new Uri(baseUri, serviceUrl);
-        BasicHttpBinding binding = new BasicHttpBinding();
+        NetTcpBinding binding = new NetTcpBinding();
         //using (var host = new ServiceHost(typeof(MessageContractImpl), serviceUri))
 
Index: /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs	(revision 13557)
@@ -33,5 +33,5 @@
 
     private IContactService CreateClient() {
-      var binding = new BasicHttpBinding();
+      var binding = new NetTcpBinding();
       var endpoint = new EndpointAddress(serverString);
       var myChannelFactory = new ChannelFactory<IContactService>(binding, endpoint);
Index: /branches/thasling/DistributedGA/DistributedGA.Hive/P2PTask.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Hive/P2PTask.cs	(revision 13556)
+++ /branches/thasling/DistributedGA/DistributedGA.Hive/P2PTask.cs	(revision 13557)
@@ -19,6 +19,5 @@
   public class P2PTask : ParameterizedNamedItem, IOptimizer {
 
-    [Storable]
-    private Log log;
+
     [Storable]
     private DateTime startTime;
@@ -31,5 +30,4 @@
     protected P2PTask(P2PTask original, Cloner cloner)
       : base(original, cloner) {
-      log = cloner.Clone(original.log);
       startTime = original.startTime;
       runCollection = cloner.Clone(original.runCollection);
@@ -41,7 +39,7 @@
 
       Parameters.Add(new ValueParameter<StringValue>("LanIpPrefix", "", new StringValue("10.")));
-      Parameters.Add(new ValueParameter<StringValue>("ContactServerURL", "", new StringValue("http://10.42.1.150:9090/DistributedGA.ContactServer/ContactService")));
-
-      log = new Log();
+      Parameters.Add(new ValueParameter<StringValue>("ContactServerURL", "", new StringValue("net.tcp://10.42.1.150:9090/DistributedGA.ContactServer/ContactService")));
+      Parameters.Add(new ValueParameter<Log>("Log", "", new Log()));
+
     }
 
@@ -83,5 +81,9 @@
         OnStarted();
 
+        var log = ((Log)(Parameters["Log"].ActualValue));
+
+
         try {
+
           log.LogMessage("Starting peer...");
           IMessageHandler h = new PeerNetworkMessageHandler();
