예제 #1
0
파일: server.py 프로젝트: uvtong/game-robot
    def __init__(self, conn, addr):
        self.conn = conn
        self.client_addr = addr
        self.c2s_encrypt = None
        self.s2c_encrypt = None

        with open(config.proto_path[0]) as f:
            c2s = f.read()
        with open(config.proto_path[1]) as f:
            s2c = f.read()

        self.proto = SprotoRpc(c2s, s2c, "header")

        self._init_encrypt()