async def listen(self, port, interface='0.0.0.0'):
        """
        Start listening on the given port.

        Provide interface="::" to accept ipv6 address
        """
        loop = asyncio.get_event_loop()
        listen = loop.create_datagram_endpoint(self._create_protocol,
                                               local_addr=(interface, port))
        log.info("Node %i listening on %s:%i",
                 self.node.long_id, interface, port)
        self.transport, self.protocol = await listen
        # finally, schedule refreshing table
        self.refresh_table()
async def listen ( self , port , interface = '0.0.0.0' ) : loop = asyncio . get_event_loop ( ) listen = loop . create_datagram_endpoint ( self . _create_protocol , local_addr = ( interface , port ) ) log . info ( "Node %i listening on %s:%i" , self . node . long_id , interface , port ) self . transport , self . protocol = await listen self . refresh_table ( )
Start listening on the given port.

        Provide interface="::" to accept ipv6 address