internal static byte[] createPubMsg(string clientID, string guidValue, string subject, byte[] data)
        {
            PubMsg pm = new PubMsg();

            pm.ClientID = clientID;
            pm.Guid     = guidValue;
            pm.Subject  = subject;
            if (data != null)
            {
                pm.Data = ByteString.CopyFrom(data);
            }

            return(pm.ToByteArray());
        }
Exemple #2
0
        internal static byte[] createPubMsg(string clientID, string guidValue, string subject, byte[] data, object connID)
        {
            PubMsg pm = new PubMsg
            {
                ClientID = clientID,
                Guid     = guidValue,
                Subject  = subject,
                ConnID   = (ByteString)connID
            };

            if (data != null)
            {
                pm.Data = ByteString.CopyFrom(data);
            }

            return(pm.ToByteArray());
        }