aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-05-26 12:25:43 -0400
committerGitHub <noreply@github.com>2017-05-26 12:25:43 -0400
commit84077e824df3bda4f74e12b961d4e962b0e04a42 (patch)
treeb2df17cd1648ef4c6fe16610abce2e04af8dfa7e /MediaBrowser.Model
parent40bc3b7b2205d7bc0802cf81bf199c655b81efd7 (diff)
parent89ba154522ed12f7ba64cc8190843f20795c728e (diff)
Merge pull request #2666 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Diagnostics/IProcess.cs2
-rw-r--r--MediaBrowser.Model/Net/IAcceptSocket.cs5
-rw-r--r--MediaBrowser.Model/Net/ISocket.cs5
-rw-r--r--MediaBrowser.Model/Services/IAsyncStreamWriter.cs5
4 files changed, 4 insertions, 13 deletions
diff --git a/MediaBrowser.Model/Diagnostics/IProcess.cs b/MediaBrowser.Model/Diagnostics/IProcess.cs
index ab0b0cfcff..7cd26af007 100644
--- a/MediaBrowser.Model/Diagnostics/IProcess.cs
+++ b/MediaBrowser.Model/Diagnostics/IProcess.cs
@@ -1,5 +1,6 @@
using System;
using System.IO;
+using System.Threading.Tasks;
namespace MediaBrowser.Model.Diagnostics
{
@@ -9,6 +10,7 @@ namespace MediaBrowser.Model.Diagnostics
void Kill();
bool WaitForExit(int timeMs);
+ Task<bool> WaitForExitAsync(int timeMs);
int ExitCode { get; }
void Start();
StreamWriter StandardInput { get; }
diff --git a/MediaBrowser.Model/Net/IAcceptSocket.cs b/MediaBrowser.Model/Net/IAcceptSocket.cs
index 4262e23901..2b5d33dce6 100644
--- a/MediaBrowser.Model/Net/IAcceptSocket.cs
+++ b/MediaBrowser.Model/Net/IAcceptSocket.cs
@@ -1,6 +1,4 @@
using System;
-using System.Threading;
-using System.Threading.Tasks;
namespace MediaBrowser.Model.Net
{
@@ -15,7 +13,8 @@ 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);
+ IAsyncResult BeginSendFile(string path, byte[] preBuffer, byte[] postBuffer, AsyncCallback callback, object state);
+ void EndSendFile(IAsyncResult result);
}
public class SocketCreateException : Exception
diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs
index 1cf6c7cc7f..7ad08f106e 100644
--- a/MediaBrowser.Model/Net/ISocket.cs
+++ b/MediaBrowser.Model/Net/ISocket.cs
@@ -14,11 +14,6 @@ namespace MediaBrowser.Model.Net
{
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(CancellationToken cancellationToken);
Task<SocketReceiveResult> ReceiveAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken);
IAsyncResult BeginReceive(byte[] buffer, int offset, int count, AsyncCallback callback);
diff --git a/MediaBrowser.Model/Services/IAsyncStreamWriter.cs b/MediaBrowser.Model/Services/IAsyncStreamWriter.cs
index f61a94f6ea..b10e12813a 100644
--- a/MediaBrowser.Model/Services/IAsyncStreamWriter.cs
+++ b/MediaBrowser.Model/Services/IAsyncStreamWriter.cs
@@ -8,9 +8,4 @@ namespace MediaBrowser.Model.Services
{
Task WriteToAsync(Stream responseStream, CancellationToken cancellationToken);
}
-
- public interface IFileWriter
- {
- Task WriteToAsync(Stream responseStream, CancellationToken cancellationToken);
- }
}