簡體   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