udp.py 文件源码

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

项目:llama 作者: dropbox 项目源码 文件源码
def tos_sendto(self, ip, port):
        """Mimic the behavior of socket.sendto() with special behavior.

        Note: Data is excluded from arguments since we encode our own.

        Args:
            ip: (str) destination IP address
            port: (int) destination UDP port

        Returns:
            (int) the number of bytes sent on the socket
        """
        return self.sendto(struct.pack(self.FORMAT, self.SIGNATURE, self._tos,
                                       time.time() * 1000, 0, 0, False),
                           (ip, port))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号