mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 21:38:27 +01:00
first pass at binding to multiple network addresses
This commit is contained in:
@@ -17,7 +17,7 @@ namespace MediaBrowser.Model.Net
|
||||
/// <summary>
|
||||
/// Createa a new unicast socket using the specified local port number.
|
||||
/// </summary>
|
||||
IUdpSocket CreateSsdpUdpSocket(int localPort);
|
||||
IUdpSocket CreateSsdpUdpSocket(IpAddressInfo localIp, int localPort);
|
||||
|
||||
/// <summary>
|
||||
/// Createa a new multicast socket using the specified multicast IP address, multicast time to live and local port.
|
||||
|
||||
@@ -10,16 +10,18 @@ namespace MediaBrowser.Model.Net
|
||||
/// Provides a common interface across platforms for UDP sockets used by this SSDP implementation.
|
||||
/// </summary>
|
||||
public interface IUdpSocket : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Waits for and returns the next UDP message sent to this socket (uni or multicast).
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<SocketReceiveResult> ReceiveAsync();
|
||||
{
|
||||
IpAddressInfo LocalIPAddress { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Waits for and returns the next UDP message sent to this socket (uni or multicast).
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<SocketReceiveResult> ReceiveAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Sends a UDP message to a particular end point (uni or multicast).
|
||||
/// </summary>
|
||||
Task SendAsync(byte[] buffer, int bytes, IpEndPointInfo endPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,5 +20,6 @@ namespace MediaBrowser.Model.Net
|
||||
/// The <see cref="IpEndPointInfo"/> the data was received from.
|
||||
/// </summary>
|
||||
public IpEndPointInfo RemoteEndPoint { get; set; }
|
||||
}
|
||||
public IpAddressInfo LocalIPAddress { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user