@Override
	public ReactorPeer<IN, OUT, ?> getObject() throws Exception {

		if (TCP.equals(transport)) {
			return NetStreams.tcpServer(NettyTcpServer.class, new NetStreams.TcpServerFactory<IN, OUT>() {
				@Override
				public Spec.TcpServerSpec<IN, OUT> apply(Spec.TcpServerSpec<IN, OUT> spec) {
					commonSpecProperties(spec);
					//Add specifics to TCP
					return spec;
				}
			});
		} else if (UDP.equals(transport)) {
			return NetStreams.udpServer(NettyDatagramServer.class, new NetStreams.UdpServerFactory<IN, OUT>() {
				@Override
				public Spec.DatagramServerSpec<IN, OUT> apply(Spec.DatagramServerSpec<IN, OUT> spec) {
					commonSpecProperties(spec);
					//Add specifics to UDP
					return spec;
				}
			});
		} else {
			throw new IllegalArgumentException(transport + " not a value transport protocol type, only udp or tcp allowed");
		}
	}
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