def connection_made(self, transport):
        '''Called by asyncio when a connection is established.

        Derived classes overriding this method must call this first.'''
        self.transport = transport
        # If the Socks proxy was used then _proxy and _remote_address are already set
        if self._proxy is None:
            # This would throw if called on a closed SSL transport.  Fixed in asyncio in
            # Python 3.6.1 and 3.5.4
            peername = transport.get_extra_info('peername')
            self._remote_address = NetAddress(peername[0], peername[1])
        self._task = spawn_sync(self._process_messages(), loop=self.loop)
def connection_made ( self , transport ) : self . transport = transport if self . _proxy is None : peername = transport . get_extra_info ( 'peername' ) self . _remote_address = NetAddress ( peername [ 0 ] , peername [ 1 ] ) self . _task = spawn_sync ( self . _process_messages ( ) , loop = self . loop )
Called by asyncio when a connection is established.

        Derived classes overriding this method must call this first.