[Modify] Replace it

This commit is contained in:
sta 2016-06-06 14:37:23 +09:00
parent e14c32190a
commit cea98bd347
2 changed files with 1 additions and 14 deletions

View File

@ -459,19 +459,6 @@ namespace WebSocketSharp.Net
while (Interlocked.CompareExchange (ref _prefixes, prefs2, prefs) != prefs);
}
public bool BindContext (HttpListenerContext context)
{
HttpListenerPrefix pref;
var lsnr = searchListener (context.Request.Url, out pref);
if (lsnr == null)
return false;
context.Listener = lsnr;
context.Connection.Prefix = pref;
return true;
}
public void Close ()
{
_socket.Close ();

View File

@ -286,7 +286,7 @@ namespace WebSocketSharp.Net
return;
}
if (!conn._listener.BindContext (conn._context)) {
if (!conn._listener.BindHttpListenerTo (conn._context)) {
conn.SendError ("Invalid host", 400);
return;
}