telnet plug-in performs connectivity and latency testing at the TCP layer. It resolves the target domain name, establishes a TCP connection, optionally performs a Keep-Alive wait, then sends a custom Request body and measures the first Response Time packet and subsequent data reception times.| Parameter name | Type | Required | Default value | Explanation and impact |
|---|---|---|---|---|
host | string | yes | — | Target Host name or IP address (supports IPv4 and IPv6). If you fill in the domain name, the plug-in will first perform DNS resolution and the resolution time will be output as an independent indicator. |
port | integer | no | 80 | Destination TCP port. Determines the target server port for the connection. |
timeout | integer | no | 3000 | Socket receive timeout, unit milliseconds. Affects the maximum wait time for recv() calls. If Network is slow or the response delay is large, it needs to be increased appropriately. |
ipVersion | string | no | auto(IPv4) | IP protocol version. Fill in IPv6 to force the use of IPv6 for DNS resolution and connection; otherwise, IPv4 is used by default. The name must be ipVersion |
| Parameter name | Type | Required | Default value | Explanation and impact |
|---|---|---|---|---|
keep-alive | integer | no | 0 (disabled) | Keep-Alive Wait Time, unit seconds. If it is greater than 0, after the connection is successful, the plug-in will first enter the receiving waiting state and continue to receive data actively pushed by the server until it times out or the connection is closed. No data is sent at this stage. Can be used to test server heartbeat or passive push scenarios. |
body | string | no | — | Request body content line. Supports repeated multiple lines (one body=... per line). Multiple lines of content will be connected with newlines and sent at once. Commonly used to construct HTTP request (such as GET / HTTP/1.1). If not set body, after the connection is successful, only the connection delay is measured, no data is sent and no response is waited for. |
tryall | boolean | no | false | Multiple IP try switch. When 1 or true, if the domain name resolves multiple IPs, it will try to connect to each IP in turn until one succeeds; when 0 or false, only the first resolved IP will be tried. |
| Stage | Indicator name | Unit | Description |
|---|---|---|---|
0 | total time | ms | The total time spent on the entire task is the cumulative value of stages 1~4. |
1 | DNS Lookup Time | ms | The time taken to resolve the host domain name to IP. If you fill in the IP directly, the value is close to 0. |
2 | Connection Establishment Time | ms | The time taken from calling connect() to the successful connection establishment. Reflects the Network layer direct connection quality to the target server. |
3 | Time to First Byte (TTFB) | ms | After sending body, the time it takes to receive the first response packet. If it is not set body, this item usually does not output a valid value. |
4 | Time to Last Byte | ms | The time it takes after receiving the first packet until the connection is closed (or recv returns 0/Error). Reflects the duration of subsequent data transmission. |
| info value | meaning | Trigger condition |
|---|---|---|
612029 | TCP connection failed | connect() Failure (destination unreachable, timeout, rejected, etc.). |
612031 | connection reset | WSAECONNREFUSED (connection refused) or reset by the peer during reception. |
612280 | Client Error | Failed to create socket (INVALID_SOCKET). |
612007 | DNS resolution failed | Domain name cannot be resolved to IP. |
host=www.example.com
port=443
timeout=5000host=update.networkbench.com
port=80
timeout=3000
body=GET / HTTP/1.1
body=Host: update.networkbench.com
body=Connection: close
body=host=push.example.com
port=8080
timeout=3000
keep-alive=10host=2001:4860:4860::8888
port=80
ipVersion=IPv6
timeout=5000host=cdn.example.com
port=80
tryall=1
timeout=3000