public ProtobufParser(Listener<MessageType> handler,MessageType prototype,int maxMessageSize,int timeoutMillis){
  this.handler=handler;
  this.prototype=prototype;
  this.maxMessageSize=Math.min(maxMessageSize,Integer.MAX_VALUE - 4);
  setTimeoutEnabled(false);
  setSocketTimeout(timeoutMillis);
}

public ProtobufParser ( Listener < MessageType > handler , MessageType prototype , int maxMessageSize , int timeoutMillis ) { this . handler = handler ; this . prototype = prototype ; this . maxMessageSize = Math . min ( maxMessageSize , Integer . MAX_VALUE - 4 ) ; setTimeoutEnabled ( false ) ; setSocketTimeout ( timeoutMillis ) ; }
creates a new protobuf handler .
