public byte[] EnterRoomRequest() { var enterroom = new ZtLiveCsEnterRoom { EnterRoomAttach = EnterRoomAttach, ClientLiveSdkVersion = ClientLiveSdkVersion }; var cmd = GenerateCommand(GlobalCommand.ENTER_ROOM, enterroom); var payload = GeneratePayload(Command.GLOBAL_COMMAND, cmd); var body = payload.ToByteArray(); var header = GenerateHeader(body); Interlocked.Increment(ref SeqId); Log.Debug("--------"); Log.Debug("Up\t\t {HeaderSeqId}, {SeqId}, {Command}", header.SeqId, payload.SeqId, payload.Command); Log.Debug("Header: {Header}", header); Log.Debug("Payload Base64: {Payload}", Convert.ToBase64String(body)); Log.Debug("Payload: {Payload}", payload); Log.Debug("\t{Command}", cmd); Log.Debug("\t\t{EnterRoom}", enterroom); Log.Debug("--------"); return(Encode(header, body, SessionKey)); }
internal byte[] EnterRoomRequest() { var enteroroom = new ZtLiveCsEnterRoom { EnterRoomAttach = EnterRoomAttach, ClientLiveSdkVersion = ClientLiveSdkVersion }; var cmd = GenerateCommand(GlobalCommand.ENTER_ROOM, enteroroom); var payload = GeneratePayload(Command.GLOBAL_COMMAND, cmd); var body = payload.ToByteString(); var header = GenerateHeader(body); SeqId++; return(Encode(header, body, SessionKey)); }
byte[] EnterRoom() { var request = new ZtLiveCsEnterRoom { EnterRoomAttach = EnterRoomAttach, ClientLiveSdkVersion = ClientLiveSdkVersion }; var cmd = new ZtLiveCsCmd { CmdType = GlobalCommand.ENTER_ROOM, Payload = request.ToByteString(), Ticket = Tickets[TicketIndex], LiveId = LiveId, }; var payload = new UpstreamPayload { Command = Command.GLOBAL_COMMAND, SeqId = SeqId++, RetryCount = RetryCount, PayloadData = cmd.ToByteString(), SubBiz = SubBiz, }; var body = payload.ToByteString(); var header = new PacketHeader { AppId = AppId, Uid = UserId, InstanceId = InstanceId, DecodedPayloadLen = body.Length, EncryptionMode = PacketHeader.Types.EncryptionMode.KEncryptionSessionKey, SeqId = HeaderSeqId++, Kpn = KPN }; return(Encode(header, body)); }