Lidgren.Network.NetConnection.WriteLocalHail C# (CSharp) Method

WriteLocalHail() private method

private WriteLocalHail ( NetOutgoingMessage om ) : void
om NetOutgoingMessage
return void
        private void WriteLocalHail(NetOutgoingMessage om)
        {
            if (m_localHailMessage != null)
            {
                byte[] hi = m_localHailMessage.Data;
                if (hi != null && hi.Length >= m_localHailMessage.LengthBytes)
                {
                    if (om.LengthBytes + m_localHailMessage.LengthBytes > m_peerConfiguration.m_maximumTransmissionUnit - 10)
                        m_peer.ThrowOrLog("Hail message too large; can maximally be " + (m_peerConfiguration.m_maximumTransmissionUnit - 10 - om.LengthBytes));
                    om.Write(m_localHailMessage.Data, 0, m_localHailMessage.LengthBytes);
                }
            }
        }