Ejemplo n.º 1
0
 def LoginRecevingChannel(self, stream_id, stream_subscribe_token,
                          client_token, uuid):
     obj = pb_ss.LoginReceivingChannel()
     obj.stream_id = stream_id
     obj.stream_subscribe_token = stream_subscribe_token
     obj.client_token = client_token
     invokeInfo = pb_common.CommonInvokeInfo()
     invokeInfo.trace_id = uuid
     invokeInfo.invoke_order = "DFDD"
     obj.commonInvokeInfo.CopyFrom(invokeInfo)
     msg_body = obj.SerializeToString()
     command_id = pb_ss.ProtoDictionary.Value("Enum2LoginReceivingChannel")
     # fmt = "!LBL"
     # msgprefix = struct.pack(fmt, 6563651, 3, command_id)
     fmt = "!L"
     msgprefix = struct.pack(fmt, command_id)
     buf = msg_body
     print buf
     f = open("buf", "wb")
     f.write(buf)
     f.close()
     return buf
Ejemplo n.º 2
0
def get_commonInvokeInfo(uuid, invoke_order):
    invokeInfo = pb_common.CommonInvokeInfo(trace_id=uuid,
                                            invoke_order=invoke_order)
    return invokeInfo
Ejemplo n.º 3
0
def getCommonInvokeInfo(uuid, invoke_order):
    invokeInfo = pb_common.CommonInvokeInfo()
    invokeInfo.trace_id = uuid
    invokeInfo.invoke_order = invoke_order
    return invokeInfo