Example #1
0
        /// <summary>
        /// Sends an appgram
        /// </summary>
        /// <param name="appgram">The appgram to send</param>
        public void SendAppgram(OutboundAppgram appgram)
        {
            Contract.Requires(appgram != null);
            Contract.Requires(appgram.Destination != null);
            Contract.Requires(appgram.Content != null);

            var header = new NetgramHeader();

            header.Destination      = null;
            header.Source           = null;
            header.HopCount         = 64;
            header.IsNetworkMessage = false;
            header.ExpectingReply   = appgram.ExpectingReply;
            header.Priority         = appgram.Priority;
            var content = new NetgramContent(appgram.Destination, header, appgram.Content);

            lock (_lock)
            {
                _send(content);
            }
        }