2using System.Collections.Generic;
18 private readonly HttpListener
m_Listener =
new HttpListener();
26 foreach (
string prefix
in prefixes)
38 private static IEnumerator<BadObject>
AcceptClient(HttpListener listener, Action<BadObject> callback)
40 bool accepted =
false;
41 listener.BeginGetContext(
46 HttpListenerContext ctx = listener.EndGetContext(r);
78 return new BadTask(runnable,
"AcceptClient");
Implements a Runnable that can return a value.
Implements a Task Object.
Wrapper for the HttpListenerContext.
Implements a BadScript HttpListener Host.
void Close()
Close the Listener.
void Start()
Starts the Listener.
void Abort()
Aborts the Listener.
BadNetHost(IEnumerable< string > prefixes)
Constructs a new BadNetHost with the given prefixes.
BadTask AcceptClient()
Accepts a Client.
readonly HttpListener m_Listener
The Listener that is to be used.
void Stop()
Stops the Listener.
static IEnumerator< BadObject > AcceptClient(HttpListener listener, Action< BadObject > callback)
Accepts a Client.
The Base Class for all BadScript Objects.
static readonly BadObject Null
The Null Value for the BadScript Language.
Contains task/async Extensions and Integrations for the BadScript2 Runtime.
Contains Network Hosting Extensions and APIs for the BadScript2 Runtime.
Contains the Runtime Objects.