server.py 文件源码

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

项目:ice-mud-game 作者: PyBargain 项目源码 文件源码
def __init__(self, host, port):
        asyncore.dispatcher.__init__(self)
        self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
        self.address = (host, port)
        self.bind(self.address)
        self.listen(1)
        self.remote_clients = {}
        self.map = RaceMap(self)
        self.network_loop = threading.Thread(target = (lambda: asyncore.loop(timeout = 3)))
        self.packet_types = {'L': self.ServerPacketLogin,
                             'C': self.ServerPacketControl,
                             'E': self.ServerPacketLogout}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号