def _factoriesShouldConnect(clientInfo, serverInfo):
 (clientHost, clientPort, clientFactory, clientTimeout, clientBindAddress) = clientInfo
 (serverPort, serverFactory, serverBacklog, serverInterface) = serverInfo
 if (serverPort == clientPort):
  return (clientFactory, serverFactory)
 else:
  return None

def _factoriesShouldConnect ( clientInfo , serverInfo ) : ( clientHost , clientPort , clientFactory , clientTimeout , clientBindAddress ) = clientInfo ( serverPort , serverFactory , serverBacklog , serverInterface ) = serverInfo if ( serverPort == clientPort ) : return ( clientFactory , serverFactory ) else : return None
should the client and server described by the arguments be connected to each other .