public void Hook(HookStream stream) { _hookStream = stream; if (_stream != null) { _hookStream.Hook(stream); } }
public Stream GetStream() { if (_stream == null) { Stream stream = GetInternalStream(); ConnectionMonitorStream mstream = new ConnectionMonitorStream(stream); mstream.AttachStats(GlobalStats); mstream.AttachStats(LocalStats); _stream = new ThrottleStream(mstream, _throttleSpeed); if (_hookStream != null) { _hookStream.Hook(_stream); } } if (_hookStream != null) { return(_hookStream); } return(_stream); }
public void Hook(HookStream stream) { _hookStream = stream; if (_stream != null) _hookStream.Hook(stream); }