SocketReceiveResult.cs 893 B

1234567891011121314151617181920212223242526272829303132
  1. #nullable disable
  2. using System.Net;
  3. namespace MediaBrowser.Model.Net
  4. {
  5. /// <summary>
  6. /// Used by the sockets wrapper to hold raw data received from a UDP socket.
  7. /// </summary>
  8. public sealed class SocketReceiveResult
  9. {
  10. /// <summary>
  11. /// Gets or sets the buffer to place received data into.
  12. /// </summary>
  13. public byte[] Buffer { get; set; }
  14. /// <summary>
  15. /// Gets or sets the number of bytes received.
  16. /// </summary>
  17. public int ReceivedBytes { get; set; }
  18. /// <summary>
  19. /// Gets or sets the <see cref="IPEndPoint"/> the data was received from.
  20. /// </summary>
  21. public IPEndPoint RemoteEndPoint { get; set; }
  22. /// <summary>
  23. /// Gets or sets the local <see cref="IPAddress"/>.
  24. /// </summary>
  25. public IPAddress LocalIPAddress { get; set; }
  26. }
  27. }