Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good tool for testing socket connections? [closed]

I'm writing a tcp/ip client and I would need a "test server" to be able to test easily. It should listen on a configurable port, show me when a client connects and what the client sent, allow me to manually enter text to send to the client. It should work on Windows.

Normally I would have use the simple but powerfull nc.exe (alias "Netcat" available as well on Unix as on Windows) but the antivirus detects it as an "hacker tool" so that my system administrator doesn't want me to use it at work.

Does anyone use another tool to test socket connections and is happy with it?

like image 981
Name Avatar asked Feb 05 '09 10:02

Name


People also ask

How do you know if a socket is closed?

The most obvious way to accomplish this is having that process call read on the socket for a connection and check whether read returns 0 (i.e. reads zero bytes from the socket), in which case we know that the connection has been closed.

How do I test a socket IO connection?

You can check the socket. connected property: var socket = io. connect(); console.

How do I know if my TCP connection is closed?

Enter "telnet + IP address or hostname + port number" (e.g., telnet www.example.com 1723 or telnet 10.17.xxx.xxx 5000) to run the telnet command in Command Prompt and test the TCP port status. If the port is open, only a cursor will show. If the port is closed, a message will say Connect failed.


1 Answers

Hercules is fantastic. It's a fully functioning tcp/udp client/server, amazing for debugging sockets. More details on the web site.

like image 150
patros Avatar answered Oct 09 '22 10:10

patros