[Modify] Move it
This commit is contained in:
parent
128d70a294
commit
004f51574e
@ -500,6 +500,21 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
#region Internal Methods
|
#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)
|
internal void Close (bool force)
|
||||||
{
|
{
|
||||||
if (_socket == null)
|
if (_socket == null)
|
||||||
@ -546,21 +561,6 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
#region Public Methods
|
#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 ()
|
public void Close ()
|
||||||
{
|
{
|
||||||
Close (false);
|
Close (false);
|
||||||
|
Loading…
Reference in New Issue
Block a user