aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener.Portable/Net/HttpListenerResponse.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-03-29 02:25:37 -0400
committerGitHub <noreply@github.com>2017-03-29 02:25:37 -0400
commit88e3fcfdc78fcab201fad72466bf2aa50b453210 (patch)
tree1e40408a0167aa2dca47ac07b16afa26e94d18d1 /SocketHttpListener.Portable/Net/HttpListenerResponse.cs
parent75f58d5665322a5045649aed89aecfef011b315c (diff)
parent9f9e81089f5606e958bc8c3f0e4d73475d02372a (diff)
Merge pull request #2554 from MediaBrowser/beta
Beta
Diffstat (limited to 'SocketHttpListener.Portable/Net/HttpListenerResponse.cs')
-rw-r--r--SocketHttpListener.Portable/Net/HttpListenerResponse.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/SocketHttpListener.Portable/Net/HttpListenerResponse.cs b/SocketHttpListener.Portable/Net/HttpListenerResponse.cs
index 9a5862cb9..d9f91c0cc 100644
--- a/SocketHttpListener.Portable/Net/HttpListenerResponse.cs
+++ b/SocketHttpListener.Portable/Net/HttpListenerResponse.cs
@@ -3,6 +3,9 @@ using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Text;
using SocketHttpListener.Primitives;
@@ -32,12 +35,14 @@ namespace SocketHttpListener.Net
private readonly ILogger _logger;
private readonly ITextEncoding _textEncoding;
+ private readonly IFileSystem _fileSystem;
- internal HttpListenerResponse(HttpListenerContext context, ILogger logger, ITextEncoding textEncoding)
+ internal HttpListenerResponse(HttpListenerContext context, ILogger logger, ITextEncoding textEncoding, IFileSystem fileSystem)
{
this.context = context;
_logger = logger;
_textEncoding = textEncoding;
+ _fileSystem = fileSystem;
}
internal bool CloseConnection
@@ -366,7 +371,7 @@ namespace SocketHttpListener.Net
{
if (chunked)
{
- return ;
+ return;
}
Version v = context.Request.ProtocolVersion;
@@ -509,5 +514,10 @@ namespace SocketHttpListener.Net
cookies.Add(cookie);
}
+
+ public Task TransmitFile(string path, long offset, long count, FileShareMode fileShareMode, CancellationToken cancellationToken)
+ {
+ return ((ResponseStream)OutputStream).TransmitFile(path, offset, count, fileShareMode, cancellationToken);
+ }
}
} \ No newline at end of file