繁体   English   中英

需要为服务器和客户端的TCP套接字连接编写加特林

[英]Need to write Gatling for TCP socket connection as server and as client

我的应用程序将Java和Spring Integration用于Tcp连接。 有两种类型的功能,首先,我需要将应用程序作为客户端进行连接,而另一种需要将其作为服务器进行连接。 两者都使用Spring Integration使用网关进行双向通信。

我需要为它编写加特林脚本,但是我是新来的加特林。

如果有一个与我的要求相似的示例程序,那将是很好的,我可以将其作为参考。 另外,我在记录器中找不到TCP的任何选项。

任何帮助/指针真的很感激。

看起来现有的Spring Integration TCP Sample满足您的要求。

您可以在其中找到以下内容的XML配置:

<int-ip:tcp-connection-factory id="crLfServer"
    type="server"
    port="${availableServerSocket}"/>

使用适当的<int-ip:tcp-inbound-gateway>并:

<int-ip:tcp-connection-factory id="client"
    type="client"
    host="localhost"
    port="${availableServerSocket}"
    single-use="true"
    so-timeout="10000"/>

客户端通过<int-ip:tcp-outbound-gateway>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM