NetMQ.Core.SessionBase.PushMsg C# (CSharp) Method

PushMsg() public method

Write the given Msg to the pipe.
public PushMsg ( Msg &msg ) : bool
msg Msg the Msg to push to the pipe
return bool
        public virtual bool PushMsg(ref Msg msg)
        {
            // First message to receive is identity (if required).
            if (!m_identityReceived)
            {
                msg.SetFlags(MsgFlags.Identity);
                m_identityReceived = true;

                if (!m_options.RecvIdentity)
                {
                    msg.Close();
                    msg.InitEmpty();
                    return true;
                }
            }

            if (m_pipe != null && m_pipe.Write(ref msg))
            {
                msg.InitEmpty();
                return true;
            }

            return false;
        }