- Timestamp:
- 07/01/16 19:23:56 (8 years ago)
- Location:
- branches/thasling/DistributedGA
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/thasling/DistributedGA/DistributedGA.Core/Domain/MessageRecieveEventArgs.cs
r13924 r13971 4 4 public class MessageRecieveEventArgs : EventArgs { 5 5 public int val; 6 public byte[] []data { get; set; }6 public byte[] data { get; set; } 7 7 public PeerInfo Sender { get; set; } 8 8 } -
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/MessageContractImpl.cs
r13924 r13971 7 7 [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] 8 8 public class MessageContractImpl : IMessageContract { 9 public void SendData(PeerInfo sender, byte[] []data) {9 public void SendData(PeerInfo sender, byte[] data) { 10 10 MessageRecieveEventArgs args = new MessageRecieveEventArgs() { Sender = sender, data = data }; 11 11 -
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs
r13970 r13971 146 146 if (e != null && e.Sender.ProblemInstance.Equals(ownInstance.ProblemInstance)) { 147 147 lock (activeQueueLocker) { 148 foreach (byte[] item in e.data) { 149 writeQueue.Enqueue(item); 150 } 148 writeQueue.Enqueue(e.data); 151 149 } 152 150 -
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs
r13970 r13971 102 102 private void SendDataFromQueue(PeerInfo destination, byte[][] data) { 103 103 try { 104 int arrayLength = 3;105 if (data.GetUpperBound(0) > arrayLength) {106 //HACK: SEND MAX 10 items107 byte[][] fake = new byte[arrayLength][];108 for (int i = 0; i < arrayLength; i++) {109 fake[i] = data[i];110 }111 data = fake;112 }104 //int arrayLength = 3; 105 //if (data.GetUpperBound(0) > arrayLength) { 106 // //HACK: SEND MAX 10 items 107 // byte[][] fake = new byte[arrayLength][]; 108 // for (int i = 0; i < arrayLength; i++) { 109 // fake[i] = data[i]; 110 // } 111 // data = fake; 112 //} 113 113 114 114 … … 119 119 120 120 var binding = new NetTcpBinding(); 121 binding.MaxReceivedMessageSize = 20000000; 122 binding.MaxBufferSize = 20000000; 123 binding.MaxBufferPoolSize = 20000000; 124 binding.ReaderQuotas.MaxArrayLength = 20000000; 125 binding.ReaderQuotas.MaxDepth = 32; 126 binding.ReaderQuotas.MaxStringContentLength = 20000000; 127 121 128 var endpoint = new EndpointAddress(serviceUri); 122 129 using (var myChannelFactory = new ChannelFactory<IMessageContract>(binding, endpoint)) { 123 130 using (IClientChannel client = (IClientChannel)myChannelFactory.CreateChannel()) { 124 ((IMessageContract)client).SendData(myself, data); //maybe timout exception... 131 for (int i = 0; i < data.GetUpperBound(0) + 1; i++) { 132 ((IMessageContract)client).SendData(myself, data[i]); //maybe timout exception... 133 } 125 134 } 126 135 } -
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageService.cs
r13956 r13971 27 27 var serviceUri = new Uri(baseUri, serviceUrl); 28 28 NetTcpBinding binding = new NetTcpBinding(); 29 binding.MaxReceivedMessageSize = 20000000; 30 binding.MaxBufferSize = 20000000; 31 binding.MaxBufferPoolSize = 20000000; 32 binding.ReaderQuotas.MaxArrayLength = 20000000; 33 binding.ReaderQuotas.MaxDepth = 32; 34 binding.ReaderQuotas.MaxStringContentLength = 20000000; 29 35 30 36 using (var host = new ServiceHost(messageContract, serviceUri)) { -
branches/thasling/DistributedGA/DistributedGA.Core/Interface/IMessageContract.cs
r13924 r13971 9 9 10 10 [OperationContract] 11 void SendData(PeerInfo sender, byte[] []data);11 void SendData(PeerInfo sender, byte[] data); 12 12 13 13 event EventHandler<MessageRecieveEventArgs> MessageRecieved; -
branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs
r13970 r13971 205 205 } 206 206 } 207 //each subscope is one emigrand208 //IScope emigrants = scope.SubScopes[1];209 //emigrantsList.Add(emigrants);210 207 211 208 { … … 221 218 msgScope.Variables.Add((IVariable)variable.Clone(cloner)); 222 219 } 223 msgScope.ClearParentScopes();224 220 HeuristicLab.Persistence.Default.Xml.XmlGenerator.Serialize(msgScope, stream); 225 221 message[ei] = stream.GetBuffer();
Note: See TracChangeset
for help on using the changeset viewer.