tcp模拟http测试

tcp模拟http测试

  1. tcp连上59.110.228.62:3030
  2. 发送http get
  3. 服务器返回正确的http数据

可以连续服务器也正常回,间隔要短,大概3秒,超过这时间就会自动断开TCP。
结论:TCP连接,HTTP发送,HTTP返回,断开TCP连接,下次重新连。
    也可以连续发,但一定要一定时间内,大概3秒。TCP一直不发送,一直不断开。


测试用例(浏览器测试:先看服务器是否正常)
http://gapi.kjxt.tech:3030/gateway/smartListCount?gatewayId=20180010

返回
{
  "status": 0,
  "count": 12
}

TCP测试,正确是这样的

22:15:47 发送数据:GET /gateway/smartListCount?gatewayId=20180010 HTTP/1.1
Host:59.110.228.62:3030
Content-Length:0

[1次]
22:15:47 收到数据:HTTP/1.1 200 OK
Vary: Origin
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Content-Length: 32
Date: Sun, 15 Nov 2020 14:15:47 GMT
Connection: keep-alive

{
  "status": 0,
  "count": 12
}

猜你喜欢

转载自blog.csdn.net/chenhao0568/article/details/109711233