<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:int="http://www.springframework.org/schema/integration"
	xmlns:int-ip="http://www.springframework.org/schema/integration/ip"
	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/ip https://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd">

	<int-ip:tcp-connection-factory id="inCFNet"
		type="server"
		port="0"
		local-address="localhost"
		so-timeout="1000"
		single-use="true"
		/>

	<int-ip:tcp-inbound-gateway request-channel="echo"
		connection-factory="inCFNet" />

	<int-ip:tcp-connection-factory id="inCFNio"
		type="server"
		port="0"
		local-address="localhost"
		so-timeout="1000"
		single-use="true"
		using-nio="true"
		/>

	<int-ip:tcp-inbound-gateway request-channel="echo"
		connection-factory="inCFNio" />

	<int-ip:tcp-connection-factory id="inCFNetRst"
		type="server"
		port="0"
		local-address="localhost"
		so-timeout="1000"
		single-use="true"
		so-linger="0"
		/>

	<int-ip:tcp-inbound-gateway request-channel="echo"
		connection-factory="inCFNetRst" />

	<int-ip:tcp-connection-factory id="inCFNioRst"
		type="server"
		port="0"
		local-address="localhost"
		so-timeout="1000"
		single-use="true"
		using-nio="true"
		so-linger="0"
		/>

	<int-ip:tcp-inbound-gateway request-channel="echo"
		connection-factory="inCFNioRst" />

	<int-ip:tcp-connection-factory id="inCFNetLinger"
		type="server"
		port="0"
		local-address="localhost"
		so-timeout="1000"
		single-use="true"
		so-linger="10000"
		/>

	<int-ip:tcp-inbound-gateway request-channel="echo"
		connection-factory="inCFNetLinger" />

	<int-ip:tcp-connection-factory id="inCFNioLinger"
		type="server"
		port="0"
		local-address="localhost"
		so-timeout="1000"
		single-use="true"
		using-nio="true"
		so-linger="10000"
		/>

	<int-ip:tcp-inbound-gateway request-channel="echo"
		connection-factory="inCFNioLinger" />

	<int:service-activator input-channel="echo" ref="testService"/>

	<bean id="testService" class="org.springframework.integration.ip.tcp.TestService"/>

</beans>
