How to know what the ‘errno’ means?

You can use strerror() to get a human-readable string for the error number. This is the same string printed by perror() but it’s useful if you’re formatting the error message for something other than standard error output. For example: Linux also supports the explicitly-threadsafe variant strerror_r().

Python socket.error: [Errno 111] Connection refused

The problem obviously was (as you figured it out) that port 36250 wasn’t open on the server side at the time you tried to connect (hence connection refused). I can see the server was supposed to open this socket after receiving SEND command on another connection, but it apparently was “not opening [it] up in … Read more