/// <summary> /// Adds a body to the AMF packet. /// </summary> /// <param name="body">The body object to add.</param> public void AddBody(AmfPacketBody body) { this.bodies.Add(body); }
private AmfPacketBody ReadBody() { this.Reset(); string target = base.ReadUtf(); // Response that the client understands. string response = base.ReadUtf(); int length = base.ReadInt32(); long position = base.Position; // Read content. try { object content = base.ReadAmf0Item(); AmfPacketBody amfBody = new AmfPacketBody(target, response, content); return amfBody; } catch(Exception) { throw; } }