aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-04 14:56:47 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-04 14:56:47 -0400
commit72aaecb27930e04aa356febf35db2372bc417166 (patch)
treec72bb0ed40bd257b93d4b11f315bbbe24e23920d /MediaBrowser.Model
parenta7b11c8ee952ca43fe949ab4f1b6577e94ce6bba (diff)
move classes to new server project
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj2
-rw-r--r--MediaBrowser.Model/Net/ISocketFactory.cs21
-rw-r--r--MediaBrowser.Model/Net/IUdpSocket.cs6
-rw-r--r--MediaBrowser.Model/Net/SocketReceiveResult.cs (renamed from MediaBrowser.Model/Net/ReceivedUdpData.cs)4
4 files changed, 18 insertions, 15 deletions
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 03bbafe60..c85b215f2 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -140,7 +140,7 @@
<Compile Include="Net\IpEndPointInfo.cs" />
<Compile Include="Net\ISocketFactory.cs" />
<Compile Include="Net\IUdpSocket.cs" />
- <Compile Include="Net\ReceivedUdpData.cs" />
+ <Compile Include="Net\SocketReceiveResult.cs" />
<Compile Include="TextEncoding\IEncoding.cs" />
<Compile Include="Extensions\LinqExtensions.cs" />
<Compile Include="FileOrganization\SmartMatchInfo.cs" />
diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs
index c0e0440c2..3f1ddf84f 100644
--- a/MediaBrowser.Model/Net/ISocketFactory.cs
+++ b/MediaBrowser.Model/Net/ISocketFactory.cs
@@ -14,13 +14,18 @@ namespace MediaBrowser.Model.Net
/// <returns>A <see cref="IUdpSocket"/> implementation.</returns>
IUdpSocket CreateUdpSocket(int localPort);
- /// <summary>
- /// Createa a new multicast socket using the specified multicast IP address, multicast time to live and local port.
- /// </summary>
- /// <param name="ipAddress">The multicast IP address to bind to.</param>
- /// <param name="multicastTimeToLive">The multicast time to live value. Actually a maximum number of network hops for UDP packets.</param>
- /// <param name="localPort">The local port to bind to.</param>
- /// <returns>A <see cref="IUdpSocket"/> implementation.</returns>
- IUdpSocket CreateUdpMulticastSocket(string ipAddress, int multicastTimeToLive, int localPort);
+ /// <summary>
+ /// Createa a new unicast socket using the specified local port number.
+ /// </summary>
+ IUdpSocket CreateSsdpUdpSocket(int localPort);
+
+ /// <summary>
+ /// Createa a new multicast socket using the specified multicast IP address, multicast time to live and local port.
+ /// </summary>
+ /// <param name="ipAddress">The multicast IP address to bind to.</param>
+ /// <param name="multicastTimeToLive">The multicast time to live value. Actually a maximum number of network hops for UDP packets.</param>
+ /// <param name="localPort">The local port to bind to.</param>
+ /// <returns>A <see cref="IUdpSocket"/> implementation.</returns>
+ IUdpSocket CreateUdpMulticastSocket(string ipAddress, int multicastTimeToLive, int localPort);
}
}
diff --git a/MediaBrowser.Model/Net/IUdpSocket.cs b/MediaBrowser.Model/Net/IUdpSocket.cs
index cbeb8a995..ef090e010 100644
--- a/MediaBrowser.Model/Net/IUdpSocket.cs
+++ b/MediaBrowser.Model/Net/IUdpSocket.cs
@@ -15,13 +15,11 @@ namespace MediaBrowser.Model.Net
/// Waits for and returns the next UDP message sent to this socket (uni or multicast).
/// </summary>
/// <returns></returns>
- Task<ReceivedUdpData> ReceiveAsync();
+ Task<SocketReceiveResult> ReceiveAsync();
/// <summary>
/// Sends a UDP message to a particular end point (uni or multicast).
/// </summary>
- /// <param name="messageData">The data to send.</param>
- /// <param name="endPoint">The <see cref="IpEndPointInfo"/> providing the address and port to send to.</param>
- Task SendTo(byte[] messageData, IpEndPointInfo endPoint);
+ Task SendAsync(byte[] buffer, int bytes, IpEndPointInfo endPoint);
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/Net/ReceivedUdpData.cs b/MediaBrowser.Model/Net/SocketReceiveResult.cs
index 1fdb22c93..0a2d04ad3 100644
--- a/MediaBrowser.Model/Net/ReceivedUdpData.cs
+++ b/MediaBrowser.Model/Net/SocketReceiveResult.cs
@@ -4,7 +4,7 @@ namespace MediaBrowser.Model.Net
/// <summary>
/// Used by the sockets wrapper to hold raw data received from a UDP socket.
/// </summary>
- public sealed class ReceivedUdpData
+ public sealed class SocketReceiveResult
{
/// <summary>
/// The buffer to place received data into.
@@ -19,6 +19,6 @@ namespace MediaBrowser.Model.Net
/// <summary>
/// The <see cref="IpEndPointInfo"/> the data was received from.
/// </summary>
- public IpEndPointInfo ReceivedFrom { get; set; }
+ public IpEndPointInfo RemoteEndPoint { get; set; }
}
}