diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-26 02:48:54 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-26 02:48:54 -0400 |
| commit | 33014f77aaacb91cfbd820052f1a49af66a214e3 (patch) | |
| tree | 97e5d61917219563013a7487f449e77c00492d3f /Emby.Common.Implementations/Net/NetAcceptSocket.cs | |
| parent | d21e8d3c3361a9d4f17c8bef8bc4245f1c8ce968 (diff) | |
update GetItems method
Diffstat (limited to 'Emby.Common.Implementations/Net/NetAcceptSocket.cs')
| -rw-r--r-- | Emby.Common.Implementations/Net/NetAcceptSocket.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Emby.Common.Implementations/Net/NetAcceptSocket.cs b/Emby.Common.Implementations/Net/NetAcceptSocket.cs index 5f97fd854..5e831ac7a 100644 --- a/Emby.Common.Implementations/Net/NetAcceptSocket.cs +++ b/Emby.Common.Implementations/Net/NetAcceptSocket.cs @@ -108,6 +108,18 @@ namespace Emby.Common.Implementations.Net return completionSource.Task; } + public IAsyncResult BeginSendFile(string path, byte[] preBuffer, byte[] postBuffer, AsyncCallback callback, object state) + { + var options = TransmitFileOptions.UseDefaultWorkerThread; + + return Socket.BeginSendFile(path, preBuffer, postBuffer, options, new AsyncCallback(FileSendCallback), state); + } + + public void EndSendFile(IAsyncResult result) + { + Socket.EndSendFile(result); + } + private void FileSendCallback(IAsyncResult ar) { // Retrieve the socket from the state object. |
