Contents

Socket Tools

Send a TCP or UDP payload and see what comes back, listen on a TCP or UDP port to see who connects and what they send, and time repeated TCP connects to one port.

Sidebar group: Troubleshooting · Works offline: partly (Send and Connection timing contact the target you name; Listen only receives, and you can test it locally) · Needs admin rights: no for sending and timing; listening on ports below 1024 can need admin/root (see Platform notes)

When to use it

Quick start

Firewall test between two machines:

  1. On the receiving machine, open Socket Tools, choose the Listen tab, pick TCP or UDP, set Port (for example 9000) and click Start listening.
  2. Allow the port in that machine's host firewall if prompted.
  3. On the sending machine, open the Send tab. Enter the receiver's address in Host (for example 192.0.2.50) and the same Port, and choose the same protocol.
  4. Type a payload such as hello\r\n and click Send.
  5. On the listener, the connection (TCP) and the data appear in the log with timestamps and the peer address.
  6. On the sender, read the log: connect time, bytes sent, any reply, and the Done reason and note.
  7. Click Stop on the listener when finished.

The three tabs stay active when you switch between them, so a listener keeps running while you use Send or Connection timing.

Inputs and options

Send tab

Field What it means Default / accepted values
Host Target host name or IP. A name that resolves to both IPv4 and IPv6 uses the IPv4 address. Empty. Required.
Port Target port. Empty. 1 to 65535. Required.
Protocol TCP or UDP. TCP
Payload Bytes to send. Text mode understands the escapes \r, \n, \t, \0, \\ and \xHH. Hex mode takes hex bytes and ignores spaces, colons, dashes, commas and 0x prefixes. Empty (TCP connects and sends nothing; UDP sends an empty datagram). Up to 64 KB.
Wait for replies (ms) How long to keep reading replies after sending. 3000. 0 to 120000.
Connect timeout (ms) TCP only: limit for the connection attempt. 5000. 100 to 60000.
Send / Stop Start, or stop waiting for replies early.
Hex view Show received data as a hex dump instead of escaped text. Off

Listen tab

Field What it means Default / accepted values
Protocol TCP or UDP. TCP
Bind address Local IP to listen on. Enter :: to listen on IPv6. Empty means all IPv4 addresses (0.0.0.0). Must be an IP that exists on this computer.
Port Local port. 9000. 1 to 65535.
Echo data back Send every received chunk back to its sender. Off
Reply on connect (optional) A payload sent once to each new TCP connection, or once to each new UDP sender. Text or Hex, with the same rules as the Send payload. Empty
Start listening / Stop Bind and listen, or stop and close all connections.
Hex view Show received data as a hex dump. Off

Connection timing tab

Field What it means Default / accepted values
Host Target host name or IP (IPv4 preferred when both exist). Empty. Required.
Port Target TCP port. Empty. Required.
Count Number of connect attempts. 20. 1 to 10000.
Interval (ms) Time from the start of one attempt to the start of the next. 1000. Minimum 100.
Timeout (ms) Limit for each attempt. 3000. 100 to 60000.
Start / Stop Begin the run, or end it early.

Reading the results

Send log

Each line has a local timestamp (to the millisecond):

Listen log

A status line shows Listening on TCP 0.0.0.0:9000 · N bytes received. Your firewall may need to allow it. Log lines:

The log keeps the last 2000 lines; a counter shows how many older lines were dropped.

Connection timing

Worked example: timing 192.0.2.80 port 443, count 20.

192.0.2.80:443 · 20 attempts
Attempts                       20
Connected                      19 (95%)
Refused                        0
Timed out                      1
Connect time min / avg / max   11.42 ms / 13.08 ms / 19.77 ms
Std dev / p95                  1.85 ms / 17.10 ms

One attempt in 20 timed out while the rest were steady around 13 ms. That points to occasional drops on the path or at the server, but a timeout alone does not show where or why.

What the results do and do not tell you

Online activity and privacy

Logs are kept in memory only. Nothing is written to disk unless you export.

Export and projects

Send and Connection timing have an Export menu with HTML, PDF, Markdown and Plain text, Redacted..., and Add to project. See Export and redaction and Projects and notes. Listen has no export.

Platform notes

Troubleshooting

"Enter a host and port." Fill in both fields on Send or Connection timing.

"could not resolve ..." / "resolving ... timed out". Check the name with Dig or use an IP.

"connect to ...: refused (RST received)". The host is reachable but nothing listens on that port, or a device rejects on its behalf.

"connect to ...: no answer within N ms". The connection was dropped silently, usually by a firewall, or the host is down.

"bad escape \x..: use two hex digits" / "unknown escape ..; use \ for a backslash" / "payload ends with a lone backslash". Fix the text payload escapes. Write a literal backslash as \\.

"hex payload has an odd number of digits" / "not hex: ..". Each byte needs two hex digits.

"payload larger than 64 KB". Shorten the payload.

"cannot bind ...: permission denied ..." Use a port of 1024 or higher.

"cannot bind ...: already in use." Another program (or another listener) holds that port. Pick another port or stop the other program.

"cannot bind ...: that address is not on this computer." The bind address must be one of this computer's own IPs, or empty for all IPv4 addresses.

Sender shows "wait time over" with no reply over TCP. The service is waiting for a valid request. Send one (for example GET / HTTP/1.1\r\nHost: example.com\r\n\r\n), or use HTTP Troubleshooter for web services.