private void commonSpecProperties(Spec.PeerSpec<IN, OUT, ?, ?, ?> spec) {
		spec
				.env(environment)
				.dispatcher(dispatcher)
				.listen(host, port);
		if (null != framing) {
			if ("linefeed".equals(framing)) {
				if(delegateCodec != null) {
					spec.codec(new DelimitedCodec(delegateCodec));
				}else {
					// optimize for massive throughput by using lightweight codec in server
					spec.codec(new DelimitedCodec<>(false, (Codec<Buffer, IN, OUT>)StandardCodecs.PASS_THROUGH_CODEC));
				}
			} else if ("length".equals(framing)) {
				if(delegateCodec != null) {
					spec.codec(new LengthFieldCodec(lengthFieldLength, delegateCodec));
				}else{
					spec.codec(new LengthFieldCodec<IN, OUT>(lengthFieldLength, (Codec<Buffer, IN, OUT>)StandardCodecs.PASS_THROUGH_CODEC));
				}
			}
		} else if(delegateCodec != null){
			spec.codec(delegateCodec);
		}


	}
Set the length of the length field if using length-field framing.

@param lengthFieldLength {@code 2} for a {@code short}, {@code 4} for an {@code int} (the default), or {@code 8}
                         for a {@code long}
@return {@literal this}
extensions/spring-xd-extension-reactor/src/main/java/org/springframework/xd/integration/reactor/net/ReactorPeerFactoryBean.java