win32: TCP connect to win32 server : 10061

Zvi Vered 1 Reputation point
2021-11-03T06:45:23.023+00:00

Hello,

From a win32 console TCP client I'm trying to connect to a win32 console TCP server.

The same server console is running in 4 PCs, all with the same O.S (win7-64).

When trying to connect to 3 PCs (our of 4) connect is OK.

To the 4th PC, rc=-1, GetLastError is 0x10061.

WSAECONNREFUSED
10061
Connection refused.
No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

How can I debug such problem ?

All I know is that the 4th PC contains extra installations on which I don't have information.
Firewall in all PCs is disabled.

Thank you,
Zvika

Windows development Windows API - Win32
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
    2021-11-08T07:54:12.627+00:00

    Can 4th PC connect to 3rd PC server? How about Winsock Client and Server Code Sample?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.