From 577ea14ffdaa37ed059a997cbe71b3db3a0d4e3f Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 9 Sep 2015 11:22:29 +0900 Subject: [PATCH] [Modify] Add ReadBytesAsync2 method Merge a part of pull request #153 from https://github.com/cswiedler/websocket-sharp/commit/fd5fc9a5fc5fa8d993a150e40c9eeb1a02138c27. --- websocket-sharp/Ext.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index ddd531d1..ea1dd804 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -660,6 +660,12 @@ namespace WebSocketSharp 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 string RemovePrefix (this string value, params string[] prefixes) { var idx = 0;