diff options
Diffstat (limited to 'MediaBrowser.Model/Net')
| -rw-r--r-- | MediaBrowser.Model/Net/ISocketFactory.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/IUdpSocket.cs | 16 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/SocketReceiveResult.cs | 3 |
3 files changed, 12 insertions, 9 deletions
diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs index 599292ddf8..ac406e7f12 100644 --- a/MediaBrowser.Model/Net/ISocketFactory.cs +++ b/MediaBrowser.Model/Net/ISocketFactory.cs @@ -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. diff --git a/MediaBrowser.Model/Net/IUdpSocket.cs b/MediaBrowser.Model/Net/IUdpSocket.cs index ef090e010c..c705107266 100644 --- a/MediaBrowser.Model/Net/IUdpSocket.cs +++ b/MediaBrowser.Model/Net/IUdpSocket.cs @@ -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); - } + } }
\ No newline at end of file diff --git a/MediaBrowser.Model/Net/SocketReceiveResult.cs b/MediaBrowser.Model/Net/SocketReceiveResult.cs index 0a2d04ad39..483e2297b9 100644 --- a/MediaBrowser.Model/Net/SocketReceiveResult.cs +++ b/MediaBrowser.Model/Net/SocketReceiveResult.cs @@ -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; } + } } |
