CSharpRTMP.Core.Protocols.Rtmp.GenericMessageFactory.VH C# (CSharp) Method

VH() public static method

public static VH ( byte ht, uint cid, uint ts, uint ml, byte mt, uint si, bool ia ) : Header
ht byte
cid uint
ts uint
ml uint
mt byte
si uint
ia bool
return Header
        public static Header VH(byte ht,uint cid,uint ts,uint ml,byte mt,uint si,bool ia)
        {
            var header = new Header();
            header.Reset(ht,cid,ts,ml,mt,si,ia);
            return header;
        }

Usage Example

Beispiel #1
0
        public static AmfMessage GetSharedObject(uint channelId, uint streamId,
                                                 double timeStamp, bool isAbsolute, string name, uint version,
                                                 bool persistent)
        {
            AmfMessage amfMessage;

            amfMessage.Header =
                GenericMessageFactory.VH(HeaderType.HT_FULL, channelId, (uint)timeStamp, 0,
                                         Defines.RM_HEADER_MESSAGETYPE_SHAREDOBJECT, streamId, isAbsolute);
            amfMessage.Body = Variant.GetMap(new VariantMapHelper
            {
                {
                    Defines.RM_SHAREDOBJECT, Variant.GetMap(new VariantMapHelper
                    {
                        { Defines.RM_SHAREDOBJECT_NAME, name },
                        { Defines.RM_SHAREDOBJECT_VERSION, version },
                        { Defines.RM_SHAREDOBJECT_PERSISTENCE, persistent }
                    })
                }
            });
            return(amfMessage);
        }