From 58734d7ba64d0f4148db30cf858b9fa190e4f8c5 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 15 Sep 2015 15:43:53 +0900 Subject: [PATCH] [Modify] Remove older --- websocket-sharp/Ext.cs | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index eac5a1e6..60c82c67 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -622,45 +622,11 @@ namespace WebSocketSharp internal static void ReadBytesAsync ( this Stream stream, int length, Action completed, Action error) - { - var buff = new byte[length]; - stream.BeginRead ( - buff, - 0, - length, - ar => { - try { - byte[] bytes = null; - try { - var len = stream.EndRead (ar); - bytes = len < 1 - ? WebSocket.EmptyBytes - : len < length - ? stream.readBytes (buff, len, length - len) - : buff; - } - catch { - bytes = WebSocket.EmptyBytes; - } - - if (completed != null) - completed (bytes); - } - catch (Exception ex) { - if (error != null) - error (ex); - } - }, - null); - } - - internal static void ReadBytesAsync2 ( - this Stream stream, int length, Action completed, Action error) { stream.readBytesAsync (new byte[length], 0, length, completed, error); } - internal static void ReadBytesAsync2 ( + internal static void ReadBytesAsync ( this Stream stream, long length, int bufferLength,