From 004f51574efdc0279c1be64649a54e82b12c1a70 Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 20 Nov 2020 19:37:37 +0900 Subject: [PATCH] [Modify] Move it --- websocket-sharp/Net/HttpConnection.cs | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/websocket-sharp/Net/HttpConnection.cs b/websocket-sharp/Net/HttpConnection.cs index 8dfbf8e4..a98b0a69 100644 --- a/websocket-sharp/Net/HttpConnection.cs +++ b/websocket-sharp/Net/HttpConnection.cs @@ -500,6 +500,21 @@ namespace WebSocketSharp.Net #region Internal Methods + internal void BeginReadRequest () + { + _timeoutCanceled.Add (_reuses, false); + _timer.Change (_timeout, Timeout.Infinite); + + try { + _stream.BeginRead (_buffer, 0, _bufferLength, onRead, this); + } + catch { + // TODO: Logging. + + close (); + } + } + internal void Close (bool force) { if (_socket == null) @@ -546,21 +561,6 @@ namespace WebSocketSharp.Net #region Public Methods - public void BeginReadRequest () - { - _timeoutCanceled.Add (_reuses, false); - _timer.Change (_timeout, Timeout.Infinite); - - try { - _stream.BeginRead (_buffer, 0, _bufferLength, onRead, this); - } - catch { - // TODO: Logging. - - close (); - } - } - public void Close () { Close (false);