{
ContextWithId ctx = (ContextWithId) state;
WriteOut (ctx.Context, headers, responseStream);
- ctx.Context.Connection.Close ();
+ ctx.Context.Response.Close ();
}
public Stream GetResponseStream (IServerResponseChannelSinkStack sinkStack, object state,
}
}
- internal void HandleRequest (MonoHttp.HttpListenerContext context)
+ internal void HandleRequest (HttpListenerContext context)
{
//build the headers
ITransportHeaders requestHeaders = new TransportHeaders ();
switch (proc) {
case ServerProcessing.Complete:
WriteOut (context, responseHeaders, responseStream);
- context.Connection.Close ();
+ context.Response.Close ();
break;
case ServerProcessing.Async:
break;
case ServerProcessing.OneWay:
- context.Connection.Close ();
+ context.Response.Close ();
break;
}
out responseMsg, out responseHeaders, out responseStream);
}
- static void WriteOut (MonoHttp.HttpListenerContext context, ITransportHeaders responseHeaders, Stream responseStream)
+ static void WriteOut (HttpListenerContext context, ITransportHeaders responseHeaders, Stream responseStream)
{
//header processing taken/modified from HttpRemotingHandler
if (responseHeaders != null && responseHeaders["__HttpStatusCode"] != null) {
static object lockObj = new object ();
static int nextId = 0;
- MonoHttp.HttpListenerContext context;
+ HttpListenerContext context;
int id;
- public MonoHttp.HttpListenerContext Context { get { return context; } }
+ public HttpListenerContext Context { get { return context; } }
public int ID { get { return id; } }
- public ContextWithId (MonoHttp.HttpListenerContext context)
+ public ContextWithId (HttpListenerContext context)
{
this.context = context;
lock (lockObj) {