public static NetMQMessage Duplicate_Ex(this NetMQMessage sourceMsg, EnumReplyFlag reply, params NetMQFrame[] contents) { Debug.Assert(sourceMsg.FrameCount >= MinMsgFrameCount, string.Format("Frame count must large than {0}.", MinMsgFrameCount)); NetMQMessage msg = new NetMQMessage(); msg.Append(sourceMsg[0].Duplicate()); msg.Append(sourceMsg[1].Duplicate()); msg.Append(sourceMsg[2].Duplicate()); msg.Append(reply.ToFrame_Ex()); if (contents != null) { foreach (var each in contents) { msg.Append(each); } } return(msg); }
public NetMQMessage CopyFrom(NetMQMessage requestMsg, EnumReplyFlag reply, params NetMQFrame[] contents) { return(requestMsg.Duplicate_Ex(reply, contents)); }
public static NetMQFrame ToFrame_Ex(this EnumReplyFlag value) { return(new NetMQFrame(BitConverter.GetBytes((byte)value))); }