diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-04 17:02:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-04 17:02:21 -0500 |
| commit | 06a8b8af88bad549f3722c6dd13b38df24a57583 (patch) | |
| tree | 4a99e9bd84d093af9b87c5277346136396a670c9 /MediaBrowser.Model/Net | |
| parent | f04b7339964ccc574a756207a7af33e21505b3c6 (diff) | |
| parent | 8c8f2aaba5e4bf573efe2730b5450a8c07abe1b3 (diff) | |
Merge pull request #2329 from MediaBrowser/dev
Dev
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 599292ddf..ac406e7f1 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 ef090e010..c70510726 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 0a2d04ad3..483e2297b 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; } + } } |
