resource.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:iotdm-pyclient 作者: peterchauyw 项目源码 文件源码
def updatedState(self):
        """Call this whenever the resource was updated, and a notification
        should be sent to observers."""

        # this implements the second implementation suggestion from
        # draft-ietf-coap-observe-11 section 4.4
        #
        ## @TODO handle situations in which this gets called more often than
        #        2^32 times in 256 seconds (or document why we can be sure that
        #        that will not happen)
        self.observe_index = (self.observe_index + 1) % (2**24)

        for o in self.observers.values():
            o.trigger()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号