aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:37:13 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:37:13 +0100
commit65bd052f3e8682d177520af57db1c8ef5cb33262 (patch)
treef5ec943937913cc7e275017e4a1055147d8ccef5 /SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs
parenta36658f6f0ed342d8b55dbf7c9ff95fe3abfa818 (diff)
ReSharper conform to 'var' settings
Diffstat (limited to 'SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs')
-rw-r--r--SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs b/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs
index 79f87dfc9..f51f72dba 100644
--- a/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs
+++ b/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs
@@ -16,8 +16,8 @@ namespace SocketHttpListener.Net.WebSockets
ValidateOptions(subProtocol, receiveBufferSize, MinSendBufferSize, keepAliveInterval);
// get property will create a new response if one doesn't exist.
- HttpListenerResponse response = context.Response;
- HttpListenerRequest request = context.Request;
+ var response = context.Response;
+ var request = context.Request;
ValidateWebSocketHeaders(context);
string secWebSocketVersion = request.Headers[HttpKnownHeaderNames.SecWebSocketVersion];
@@ -50,15 +50,15 @@ namespace SocketHttpListener.Net.WebSockets
response.StatusCode = (int)HttpStatusCode.SwitchingProtocols; // HTTP 101
response.StatusDescription = HttpStatusDescription.Get(HttpStatusCode.SwitchingProtocols);
- HttpResponseStream responseStream = response.OutputStream as HttpResponseStream;
+ var responseStream = response.OutputStream as HttpResponseStream;
// Send websocket handshake headers
await responseStream.WriteWebSocketHandshakeHeadersAsync().ConfigureAwait(false);
//WebSocket webSocket = WebSocket.CreateFromStream(context.Connection.ConnectedStream, isServer: true, subProtocol, keepAliveInterval);
- WebSocket webSocket = new WebSocket(subProtocol);
+ var webSocket = new WebSocket(subProtocol);
- HttpListenerWebSocketContext webSocketContext = new HttpListenerWebSocketContext(
+ var webSocketContext = new HttpListenerWebSocketContext(
request.Url,
request.Headers,
request.Cookies,