[英]Need to write Gatling for TCP socket connection as server and as client
My application uses Java and Spring Integration for Tcp connection. 我的应用程序将Java和Spring Integration用于Tcp连接。 There are two types of features, In first I need to connect application as client and in another need to connect as server.
有两种类型的功能,首先,我需要将应用程序作为客户端进行连接,而另一种需要将其作为服务器进行连接。 Both are having two way communication using gateway using spring Integration.
两者都使用Spring Integration使用网关进行双向通信。
I need to write gatling script for same, but I am new to gatling. 我需要为它编写加特林脚本,但是我是新来的加特林。
It would be great if there is sample program which is similar to my requirement, that I can refer as reference. 如果有一个与我的要求相似的示例程序,那将是很好的,我可以将其作为参考。 Also I was not able to find any option for TCP in recorder.
另外,我在记录器中找不到TCP的任何选项。
Any help/pointer is really appreciated. 任何帮助/指针真的很感激。
Looks like existing Spring Integration TCP Sample meets your requirements. 看起来现有的Spring Integration TCP Sample满足您的要求。
You can find there an XML config for the: 您可以在其中找到以下内容的XML配置:
<int-ip:tcp-connection-factory id="crLfServer"
type="server"
port="${availableServerSocket}"/>
with an appropriate <int-ip:tcp-inbound-gateway>
and: 使用适当的
<int-ip:tcp-inbound-gateway>
并:
<int-ip:tcp-connection-factory id="client"
type="client"
host="localhost"
port="${availableServerSocket}"
single-use="true"
so-timeout="10000"/>
for the client side to communicate via <int-ip:tcp-outbound-gateway>
. 供客户端通过
<int-ip:tcp-outbound-gateway>
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.