def _can_connect(ip, port):
cs = socket.socket()<EOL>try:<EOL><INDENT>cs.connect((ip, port))<EOL>cs.close()<EOL>return True<EOL><DEDENT>except socket.error:<EOL><INDENT>return False<EOL><DEDENT>
Checks if a TCP port at IP address is possible to connect to