NativeDataChannel.Create(webRtc.Handle, label, bundle_, out _handle).
ThrowIfFailed("Failed to create webrtc data channel");
- Debug.Assert(_handle != null);
+ Debug.Assert(_handle != IntPtr.Zero);
Label = label;
}
/// Gets the amount of buffered data.
/// </summary>
/// <value>The buffered amount in bytes.</value>
+ /// <exception cref="ObjectDisposedException">The WebRTCDataChannel has already been disposed.</exception>
/// <since_tizen> 10 </since_tizen>
public uint BufferedAmount
{
}
}
- private uint? _bufferThreshold;
+ private uint? _bufferThreshold = 0;
/// <summary>
/// Gets or sets the threshold of data channel buffered amount.<br/>
/// If the amount of buffered data is lower than threshold value, <see cref="BufferedAmountLow"/> will be occurred.<br/>
/// The default value is 0, which means <see cref="BufferedAmountLow"/> is disabled and will not be raised.
/// </summary>
+ /// <exception cref="ObjectDisposedException">The WebRTCDataChannel has already been disposed.</exception>
/// <since_tizen> 10 </since_tizen>
public uint BufferedAmountLowThreshold
{
return;
}
- if (_handle != null)
+ if (_handle != IntPtr.Zero)
{
NativeDataChannel.Destroy(_handle);
_disposed = true;