Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/18/12 03:22:03 (12 years ago)
Author:
abeham
Message:

#1896:

  • Added tags 1000 to max which can be used as extensions to the quality message
  • Updated the evaluator to allow better subclassing in case extensions are used
  • Updated the method signatures to pipe the extension registry down to the channel
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationTCPChannel.cs

    r7259 r8298  
    8888    #endregion
    8989
    90    
     90
    9191
    9292    #region IExternalEvaluationChannel Members
     
    105105        byte[] buffer = EncodeDelimited(message);
    106106        socket.Send(buffer);
    107       }
    108       catch (SocketException) {
    109         Close();
    110         throw;
    111       }
    112       catch (ObjectDisposedException) {
     107      } catch (SocketException) {
     108        Close();
     109        throw;
     110      } catch (ObjectDisposedException) {
    113111        socket = null;
    114112        Close();
     
    138136    }
    139137
    140     public override IMessage Receive(IBuilder builder) {
     138    public override IMessage Receive(IBuilder builder, ExtensionRegistry extensions) {
    141139      try {
    142140        byte[] buffer = GetMessageBuffer();
    143         return builder.WeakMergeFrom(ByteString.CopyFrom(buffer)).WeakBuild();
    144       }
    145       catch (SocketException) {
    146         Close();
    147         throw;
    148       }
    149       catch (ObjectDisposedException) {
     141        return builder.WeakMergeFrom(ByteString.CopyFrom(buffer), extensions).WeakBuild();
     142      } catch (SocketException) {
     143        Close();
     144        throw;
     145      } catch (ObjectDisposedException) {
    150146        socket = null;
    151147        Close();
     
    186182            socket.Disconnect(false);
    187183          socket.Close();
    188         }
    189         catch { }
     184        } catch { }
    190185        socket = null;
    191186      }
Note: See TracChangeset for help on using the changeset viewer.