#NEWLINE# def clientConnect( self , host , port ) : #NEWLINE# #INDENT# '\n        Initiate a peer-to-peer session as the partner by connecting to the\n        host peer with the given host and port.\n\n        @param host: ip address of the host Peer\n        @param port: C{int} port number of the host Peer\n        ' #NEWLINE# self . logger . info ( ( 'Connecting to peer at %s:%d' % ( host , port ) ) ) #NEWLINE# self . host = host #NEWLINE# self . port = port #NEWLINE# self . peerType = base . CLIENT #NEWLINE# self . role = base . PARTNER_ROLE #NEWLINE# self . state = base . STATE_CONNECTING #NEWLINE# self . connection = reactor . connectTCP ( self . host , self . port , self , timeout = 5 )