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); } }
public void SendHearbeat() { connectedDatagramTransmitter.Send(headerBuffer, 0, 0); }