def __init__(self,
                 puid=None,
                 local=None,
                 uid=None,
                 name=None,
                 ha=None,
                 kind=None,
                 host=None,
                 port=None,
                 bufcnt=2,
                 **kwa):
        if ha is None:
            if (host is not None or port is not None):
                host = host if host is not None else ''
                port = port if port is not None else self.Port
                ha = (host, port)
            else:
                ha = ('', self.Port)  # host all interfaces, bind with 0 port creates ephemeral port

        self.bufcnt = bufcnt  # used in createServer

        if getattr(self, 'puid', None) is None:  # need .puid to make local
            self.puid = puid if puid is not None else self.Uid

        local = local if local is not None else devicing.UdpLocalDevice(stack=self,
                                                                        uid=uid,
                                                                        name=name,
                                                                        ha=ha,
                                                                        kind=kind)
        super().__init__(local=local, ha=ha, **kwa)
Setup Stack instance
dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/proto/stacking.py/UdpStack.__init__