<?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"
	xmlns:int-event="http://www.springframework.org/schema/integration/event"
	xmlns:task="http://www.springframework.org/schema/task"
	xsi:schemaLocation="http://www.springframework.org/schema/integration/ip https://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/task https://www.springframework.org/schema/task/spring-task.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration/event https://www.springframework.org/schema/integration/event/spring-integration-event.xsd">

	<int:message-history/>

	<int-ip:tcp-connection-factory id="serverNet"
		type="server"
		using-nio="false"
		single-use="true"
		port="0"
		task-executor="exec"
		lookup-host="false"
		so-timeout="20000"
	/>

	<int-ip:tcp-connection-factory id="clientNet"
		type="client"
		host="localhost"
		port="0"
		single-use="true"
		lookup-host="false"
		so-timeout="100000"
	/>

	<int-ip:tcp-connection-factory id="serverNio"
		type="server"
		using-nio="true"
		single-use="true"
		port="0"
		task-executor="exec"
		lookup-host="false"
		so-timeout="20000"
	/>

	<int-ip:tcp-connection-factory id="clientNio"
		type="client"
		host="localhost"
		using-nio="true"
		port="0"
		single-use="true"
		lookup-host="false"
		so-timeout="100000"
	/>

	<int-ip:tcp-inbound-gateway id="gwNet"
		request-channel="serverSideChannel"
		connection-factory="serverNet"
		reply-timeout="1"
		/>

	<int-ip:tcp-inbound-gateway id="gwNio"
		request-channel="serverSideChannel"
		connection-factory="serverNio"
		reply-timeout="1"
		/>

	<int:channel id="serverSideChannel">
		<int:queue/>
	</int:channel>

	<task:executor id="exec" pool-size="10"/>

	<int-event:inbound-channel-adapter channel="events"
		event-types="org.springframework.integration.ip.tcp.connection.TcpConnectionEvent"/>

	<int:channel id="events">
		<int:queue />
	</int:channel>

</beans>
