Browse Source

[Modify] Polish it

pull/298/merge
sta 5 months ago
parent
commit
a8b1db0184
  1. 5
      websocket-sharp/Net/WebSockets/TcpListenerWebSocketContext.cs

5
websocket-sharp/Net/WebSockets/TcpListenerWebSocketContext.cs

@ -61,7 +61,6 @@ namespace WebSocketSharp.Net.WebSockets
private Stream _stream; private Stream _stream;
private TcpClient _tcpClient; private TcpClient _tcpClient;
private IPrincipal _user; private IPrincipal _user;
private System.Net.EndPoint _userEndPoint;
private WebSocket _websocket; private WebSocket _websocket;
#endregion #endregion
@ -104,8 +103,6 @@ namespace WebSocketSharp.Net.WebSockets
_stream = netStream; _stream = netStream;
} }
_userEndPoint = _socket.RemoteEndPoint;
_request = HttpRequest.ReadRequest (_stream, 90000); _request = HttpRequest.ReadRequest (_stream, 90000);
_websocket = new WebSocket (this, protocol); _websocket = new WebSocket (this, protocol);
} }
@ -419,7 +416,7 @@ namespace WebSocketSharp.Net.WebSockets
/// </value> /// </value>
public override System.Net.IPEndPoint UserEndPoint { public override System.Net.IPEndPoint UserEndPoint {
get { get {
return (System.Net.IPEndPoint) _userEndPoint;
return (System.Net.IPEndPoint) _socket.RemoteEndPoint;
} }
} }

Loading…
Cancel
Save