Socket error 10061 is a connection refused error. This means that the target computer actively refused to accept the connection request. This is frequently caused by trying to access a service that is inactive.
The full return code/value is WSAECONNREFUSED/10061. This error indicates that the connection with the target computer is good, but the request is invalid. Check the target computer to ensure the required services are running. If the required services are functioning as expected, ensure they are listening for connection requests on the same port that the requests are being made. Both machines must be using the same port in order to communicate.