Exemple #1
0
        /// <summary> Prepares the outgoing reliable stream: Writes the reliable bit & reliable header,
        /// sets stream parameters, and updates send stats. </summary>
        private NetHeader WriteHeader()
        {
            sendStream.Connection = Connection;
            sendStream.Socket     = Connection.Socket;

            sendStream.WriteBool(true);
            var header = NetHeader.Create(this, NetTime.Milliseconds());

            header.ToStream(sendStream);

            ReceivedSinceLastSend = 0;
            Sent++;

            return(header);
        }