diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-03-29 02:25:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-29 02:25:37 -0400 |
| commit | 88e3fcfdc78fcab201fad72466bf2aa50b453210 (patch) | |
| tree | 1e40408a0167aa2dca47ac07b16afa26e94d18d1 /MediaBrowser.Model/Net | |
| parent | 75f58d5665322a5045649aed89aecfef011b315c (diff) | |
| parent | 9f9e81089f5606e958bc8c3f0e4d73475d02372a (diff) | |
Merge pull request #2554 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Model/Net')
| -rw-r--r-- | MediaBrowser.Model/Net/IAcceptSocket.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/ISocket.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/ISocketFactory.cs | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Net/IAcceptSocket.cs b/MediaBrowser.Model/Net/IAcceptSocket.cs index cac23b337..4262e2390 100644 --- a/MediaBrowser.Model/Net/IAcceptSocket.cs +++ b/MediaBrowser.Model/Net/IAcceptSocket.cs @@ -1,4 +1,6 @@ using System; +using System.Threading; +using System.Threading.Tasks; namespace MediaBrowser.Model.Net { @@ -13,6 +15,7 @@ namespace MediaBrowser.Model.Net void Bind(IpEndPointInfo endpoint); void Connect(IpEndPointInfo endPoint); void StartAccept(Action<IAcceptSocket> onAccept, Func<bool> isClosed); + Task SendFile(string path, byte[] preBuffer, byte[] postBuffer, CancellationToken cancellationToken); } public class SocketCreateException : Exception diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs index 90070b128..61fc0e28b 100644 --- a/MediaBrowser.Model/Net/ISocket.cs +++ b/MediaBrowser.Model/Net/ISocket.cs @@ -24,5 +24,6 @@ namespace MediaBrowser.Model.Net /// Sends a UDP message to a particular end point (uni or multicast). /// </summary> Task SendAsync(byte[] buffer, int bytes, IpEndPointInfo endPoint, CancellationToken cancellationToken); + Task SendWithLockAsync(byte[] buffer, int bytes, IpEndPointInfo endPoint, CancellationToken cancellationToken); } }
\ No newline at end of file diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs index 4b70f3362..e7dbf6cb1 100644 --- a/MediaBrowser.Model/Net/ISocketFactory.cs +++ b/MediaBrowser.Model/Net/ISocketFactory.cs @@ -14,6 +14,8 @@ namespace MediaBrowser.Model.Net /// <returns>A <see cref="ISocket"/> implementation.</returns> ISocket CreateUdpSocket(int localPort); + ISocket CreateUdpBroadcastSocket(int localPort); + ISocket CreateTcpSocket(IpAddressInfo remoteAddress, int remotePort); /// <summary> |
