gomap icon indicating copy to clipboard operation
gomap copied to clipboard

Distinguish between open/refused/timeout

Open tmalaher opened this issue 3 years ago • 2 comments

In my local copy I've made modifications so that the portResult distinguishes between these three cases: Connect OK - LISTEN process on the other end made a connection Timeout - Firewall blocked connection Connection Refused - Firewall did not block connection, but no LISTENing process on the other end. Thus this port could be used for a new server process

I find this handy because I don't want to have to open new ports in the firewall, and so I need to see what ports are open without having to run a listening process on all ports.

tmalaher avatar Feb 11 '22 22:02 tmalaher

Send over a PR, and i'll give this new feature a test.

JustinTimperio avatar Feb 12 '22 00:02 JustinTimperio

Not happy with my current implementation. Need to do some more research/experimentation. Go does not make it easy to distinguish the reasons that a Dial fails, unlike ECONNREFUSED in C.

tmalaher avatar Feb 12 '22 04:02 tmalaher