simulator_stuff.py 文件源码

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

项目:simulator 作者: P2PSP 项目源码 文件源码
def sendto(self, msg, address):
        self.lg.info("{} - [{}] -> {}".format(self.sock.getsockname(), \
                                              msg, \
                                              address))
        try:
            return self.sock.sendto(msg, socket.MSG_DONTWAIT, address + "_udp")
        except ConnectionRefusedError:
            self.lg.error("simulator_stuff.sendto: the message {} has not been delivered because the destination {} left the team".format(msg, address))
            raise
        except KeyboardInterrupt:
            self.lg.warning("simulator_stuff.sendto: send_packet {} to {}".format(msg, address))
            raise
        except FileNotFoundError:
            self.lg.error("simulator_stuff.sendto: {}".format(address + "_udp"))
            raise
        except BlockingIOError:
            raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号