internal Msg(MsgArg arg, Subscription s, byte[] payload, long totalLen) { subject = arg.subject; sid = arg.sid; _reply = arg.reply; sub = s; if (arg.hdr > 0) { HeaderStatusReader hsr = new HeaderStatusReader(payload, arg.hdr); header = hsr.Header; status = hsr.Status; } // make a deep copy of the bytes for this message. long payloadLen = totalLen - arg.hdr; if (payloadLen > 0) { data = new byte[payloadLen]; Array.Copy(payload, arg.hdr, data, 0, (int)(totalLen - arg.hdr)); } else { data = Empty; } }
public UnhandledStatusEventArgs(Connection c, Subscription s, MsgStatus status) : base(c, s) { Status = status; }
public NATSJetStreamStatusException(Subscription sub, MsgStatus status) : base($"Unknown or unprocessed status message: {status.Message}") { Sub = sub; Status = status; }