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 API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
1,901 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 5,851 Reputation points Microsoft Employee
    2021-11-08T07:54:12.627+00:00

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

    No comments