Added GetWebSocketStream method to HttpConnection class

This commit is contained in:
sta
2014-05-15 11:57:20 +09:00
parent fdf413545e
commit e20c3df551
3 changed files with 24 additions and 12 deletions

View File

@@ -44,7 +44,6 @@ namespace WebSocketSharp.Net.WebSockets
#region Private Fields
private HttpListenerContext _context;
private WebSocketStream _stream;
private WebSocket _websocket;
#endregion
@@ -55,7 +54,6 @@ namespace WebSocketSharp.Net.WebSockets
HttpListenerContext context, string protocol, Logger logger)
{
_context = context;
_stream = WebSocketStream.CreateServerStream (context);
_websocket = new WebSocket (this, protocol, logger);
}
@@ -65,7 +63,7 @@ namespace WebSocketSharp.Net.WebSockets
internal WebSocketStream Stream {
get {
return _stream;
return _context.Connection.GetWebSocketStream ();
}
}
@@ -141,7 +139,7 @@ namespace WebSocketSharp.Net.WebSockets
/// </value>
public override bool IsSecureConnection {
get {
return _context.Request.IsSecureConnection;
return _context.Connection.IsSecure;
}
}