Esempio n. 1
0
        public void Send(byte[] data, UInt32 offset, UInt32 length)
        {
            Int64 now = Stopwatch.GetTimestamp();

            if (now <= dropSentDatagramsUntil)
            {
                if (debugLog != null)
                {
                    debugLog.WriteLine("[ClumsyTransmitter] Send packet dropped (length={0}).  Will drop for another {1} milliseconds",
                                       length, (dropSentDatagramsUntil - now).StopwatchTicksAsInt64Milliseconds());
                }
            }
            else
            {
                underlyingTransmitter.Send(data, offset, length);
            }
        }
Esempio n. 2
0
 public void SendHearbeat()
 {
     connectedDatagramTransmitter.Send(headerBuffer, 0, 0);
 }