admin 管理员组文章数量: 1086019
I'm sending a text to server which a Socket message connected via a Port and IP I've used JSR223sampler to check the connection, which says "Connected"
This is my Text message
PLPL|WM|SL|AS|PICK|100002001|PICKORDER|I|GPick059|2025-04-30 22:05:09.00||E|N|Y||MX1|
GPick059|T123456001|1|JProd02|1
I've tried using the Escape Sequence \x02 for STX character. \x03 represents the ETX character. However the message I see on the server logs is with the Escape Characters and not STX and ETX.
I've used TCPClientImpl and BinaryTCPClientImpl TCPClient Classes
Message in the Server Logs:
07:37:34.097 [8] (null) INFO Interface.SocketProcessing.SocketProcessBase - Client IP:63862 Message : \x02PLPL|WM|SL|AS|PICK|100002001|PICKORDER|I|GPick059|2025-04-30 22:05:09.00||E|N|Y||MX1| GPick059|T123456001|1|JProd02|1 \x03
I'm sending a text to server which a Socket message connected via a Port and IP I've used JSR223sampler to check the connection, which says "Connected"
This is my Text message
PLPL|WM|SL|AS|PICK|100002001|PICKORDER|I|GPick059|2025-04-30 22:05:09.00||E|N|Y||MX1|
GPick059|T123456001|1|JProd02|1
I've tried using the Escape Sequence \x02 for STX character. \x03 represents the ETX character. However the message I see on the server logs is with the Escape Characters and not STX and ETX.
I've used TCPClientImpl and BinaryTCPClientImpl TCPClient Classes
Message in the Server Logs:
07:37:34.097 [8] (null) INFO Interface.SocketProcessing.SocketProcessBase - Client IP:63862 Message : \x02PLPL|WM|SL|AS|PICK|100002001|PICKORDER|I|GPick059|2025-04-30 22:05:09.00||E|N|Y||MX1| GPick059|T123456001|1|JProd02|1 \x03
Share Improve this question edited Mar 28 at 11:50 g90uagk asked Mar 28 at 11:42 g90uagkg90uagk 4192 gold badges6 silver badges16 bronze badges1 Answer
Reset to default 1You can use __groovy() function like:
${__groovy(URLDecoder.decode('%02'\, 'ASCII'),)}
and
${__groovy(URLDecoder.decode('%03'\, 'ASCII'),)}
More information: How to Send Control Characters Using the JMeter TCP Sampler?
本文标签:
版权声明:本文标题:performance - How do I include STX (Start of Text) and ETX (End of Text) characters as prefixes and suffixes to TCP Sampler in J 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1744039326a2522963.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论