[Modify] Rename it
This commit is contained in:
parent
30599aa76a
commit
7cf6b82177
@ -50,10 +50,10 @@ namespace WebSocketSharp.Net
|
|||||||
private MemoryStream _body;
|
private MemoryStream _body;
|
||||||
private static readonly byte[] _crlf;
|
private static readonly byte[] _crlf;
|
||||||
private bool _disposed;
|
private bool _disposed;
|
||||||
|
private Stream _innerStream;
|
||||||
private static readonly byte[] _lastChunk;
|
private static readonly byte[] _lastChunk;
|
||||||
private HttpListenerResponse _response;
|
private HttpListenerResponse _response;
|
||||||
private bool _sendChunked;
|
private bool _sendChunked;
|
||||||
private Stream _stream;
|
|
||||||
private Action<byte[], int, int> _write;
|
private Action<byte[], int, int> _write;
|
||||||
private Action<byte[], int, int> _writeBody;
|
private Action<byte[], int, int> _writeBody;
|
||||||
private Action<byte[], int, int> _writeChunked;
|
private Action<byte[], int, int> _writeChunked;
|
||||||
@ -73,12 +73,12 @@ namespace WebSocketSharp.Net
|
|||||||
#region Internal Constructors
|
#region Internal Constructors
|
||||||
|
|
||||||
internal ResponseStream (
|
internal ResponseStream (
|
||||||
Stream stream,
|
Stream innerStream,
|
||||||
HttpListenerResponse response,
|
HttpListenerResponse response,
|
||||||
bool ignoreWriteExceptions
|
bool ignoreWriteExceptions
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_stream = stream;
|
_innerStream = innerStream;
|
||||||
_response = response;
|
_response = response;
|
||||||
|
|
||||||
if (ignoreWriteExceptions) {
|
if (ignoreWriteExceptions) {
|
||||||
@ -86,7 +86,7 @@ namespace WebSocketSharp.Net
|
|||||||
_writeChunked = writeChunkedWithoutThrowingException;
|
_writeChunked = writeChunkedWithoutThrowingException;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_write = stream.Write;
|
_write = innerStream.Write;
|
||||||
_writeChunked = writeChunked;
|
_writeChunked = writeChunked;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,9 +233,9 @@ namespace WebSocketSharp.Net
|
|||||||
{
|
{
|
||||||
var size = getChunkSizeBytes (count);
|
var size = getChunkSizeBytes (count);
|
||||||
|
|
||||||
_stream.Write (size, 0, size.Length);
|
_innerStream.Write (size, 0, size.Length);
|
||||||
_stream.Write (buffer, offset, count);
|
_innerStream.Write (buffer, offset, count);
|
||||||
_stream.Write (_crlf, 0, 2);
|
_innerStream.Write (_crlf, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeChunkedWithoutThrowingException (
|
private void writeChunkedWithoutThrowingException (
|
||||||
@ -254,7 +254,7 @@ namespace WebSocketSharp.Net
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
_stream.Write (buffer, offset, count);
|
_innerStream.Write (buffer, offset, count);
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ namespace WebSocketSharp.Net
|
|||||||
_response.Close ();
|
_response.Close ();
|
||||||
|
|
||||||
_response = null;
|
_response = null;
|
||||||
_stream = null;
|
_innerStream = null;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
_body = null;
|
_body = null;
|
||||||
_response = null;
|
_response = null;
|
||||||
_stream = null;
|
_innerStream = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void InternalWrite (byte[] buffer, int offset, int count)
|
internal void InternalWrite (byte[] buffer, int offset, int count)
|
||||||
|
Loading…
Reference in New Issue
Block a user