[Modify] Replace it
This commit is contained in:
parent
e14c32190a
commit
cea98bd347
@ -459,19 +459,6 @@ namespace WebSocketSharp.Net
|
|||||||
while (Interlocked.CompareExchange (ref _prefixes, prefs2, prefs) != prefs);
|
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 ()
|
public void Close ()
|
||||||
{
|
{
|
||||||
_socket.Close ();
|
_socket.Close ();
|
||||||
|
@ -286,7 +286,7 @@ namespace WebSocketSharp.Net
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!conn._listener.BindContext (conn._context)) {
|
if (!conn._listener.BindHttpListenerTo (conn._context)) {
|
||||||
conn.SendError ("Invalid host", 400);
|
conn.SendError ("Invalid host", 400);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user