update GetItems method

This commit is contained in:
Luke Pulverenti
2017-05-26 02:48:54 -04:00
parent d21e8d3c33
commit 33014f77aa
237 changed files with 460 additions and 531 deletions

View File

@@ -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.