public void ReplyCreateStream() { double param0 = 4; object param1 = null; double param2 = 1; var properties = new List <AMFProperty>(); properties.Add(new AMFProperty("", param0, AMF0Types.Number)); properties.Add(new AMFProperty("", param1, AMF0Types.Null)); properties.Add(new AMFProperty("", param2, AMF0Types.Number)); var reply = new AMFCall("_result", properties); Send(reply.Serialize()); }
public void ReplyPublish() { var sendData = new MemoryStream(); var streamBegin = new StreamBegin() { ID = 1 }.Serialize(); double param1 = 0; object param2 = null; AMFObject param3 = new AMFObject(); param3.SetProperty("level", "status", AMF0Types.String); param3.SetProperty("code", "NetStream.Publish.Start", AMF0Types.String); param3.SetProperty("description", "jtv_ASDF", AMF0Types.String); param3.SetProperty("client", (double)1234, AMF0Types.Number); var properties = new List <AMFProperty>(); properties.Add(new AMFProperty("", param1, AMF0Types.Number)); properties.Add(new AMFProperty("", param2, AMF0Types.Null)); var reply = new AMFCall("onStatus", properties); sendData.Write(streamBegin, 0, streamBegin.Length); var resultSer = reply.Serialize(); sendData.Write(resultSer, 0, resultSer.Length); resultSer = param3.Serialize(); sendData.Write(resultSer, 0, resultSer.Length); Send(sendData.ToArray()); }
public void ReplyPublish() { var sendData = new MemoryStream(); var streamBegin = new StreamBegin() { ID = 1 }.Serialize(); double param1 = 0; object param2 = null; AMFObject param3 = new AMFObject(); param3.SetProperty("level", "status", AMF0Types.String); param3.SetProperty("code", "NetStream.Publish.Start", AMF0Types.String); param3.SetProperty("description", "jtv_ASDF", AMF0Types.String); param3.SetProperty("client", (double)1234, AMF0Types.Number); var properties = new List<AMFProperty>(); properties.Add(new AMFProperty("", param1, AMF0Types.Number)); properties.Add(new AMFProperty("", param2, AMF0Types.Null)); var reply = new AMFCall("onStatus", properties); sendData.Write(streamBegin, 0, streamBegin.Length); var resultSer = reply.Serialize(); sendData.Write(resultSer, 0, resultSer.Length); resultSer = param3.Serialize(); sendData.Write(resultSer, 0, resultSer.Length); Send(sendData.ToArray()); }
public void ReplyCreateStream() { double param0 = 4; object param1 = null; double param2 = 1; var properties = new List<AMFProperty>(); properties.Add(new AMFProperty("", param0, AMF0Types.Number)); properties.Add(new AMFProperty("", param1, AMF0Types.Null)); properties.Add(new AMFProperty("", param2, AMF0Types.Number)); var reply = new AMFCall("_result", properties); Send(reply.Serialize()); }
public AMFCallData(byte[] payload) { var obj = new AMFCall(payload); Call = obj; }