Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/01/16 19:23:56 (6 years ago)
Author:
thasling
Message:

#2615:
increased message size to 20MB
made changes in some interfaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs

    r13970 r13971  
    102102    private void SendDataFromQueue(PeerInfo destination, byte[][] data) {
    103103      try {
    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         }
     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        //}
    113113
    114114
     
    119119
    120120        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
    121128        var endpoint = new EndpointAddress(serviceUri);
    122129        using (var myChannelFactory = new ChannelFactory<IMessageContract>(binding, endpoint)) {
    123130          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            }
    125134          }
    126135        }
Note: See TracChangeset for help on using the changeset viewer.