我需要编写一个tcp客户端,该客户端仅发送数据发送者tcp,而不等待响应。 我用网关尝试过:
<int:gateway id="TCPgw"
service-interface="org.mypackage.MyClass"
default-request-channel="input"/>
<int-ip:tcp-connection-factory id="TCPClient"
type="client"
host="xxx.xxx.x.xx"
port="xxxx"
single-use="true"
so-timeout="10000"
deserializer="TCPDeserializer"
serializer="TCPSerializer"
ssl-context-support="SslContextSupport"
/>
<int-ip:tcp-outbound-gateway id="TCPclientGateway"
request-channel="input"
connection-factory="TCPClient"
request-timeout="100000"
reply-timeout="100000"/>
<int:channel id="input"/>
现在可以正常工作,但仍要等待响应。
我需要什么:
我阅读了很多教程,但没有发现任何内容描述如何设置发送客户端。
我认为,我需要使用适配器,但我不知道如何使用。 谢谢