protected virtual void OnHmeApplicationRequestReceived(HttpListenerContext context) { ServerLog.Write(TraceEventType.Verbose, "Enter HmeServer.OnHmeApplicationRequestReceived"); HmeApplicationHttpResponse.BeginResponse(context); HmeConnection connection = new HmeConnection(context.Request.InputStream, context.Response.OutputStream); HmeApplicationConnectedEventArgs args = new HmeApplicationConnectedEventArgs(); args.Application = connection.Application; args.BaseUri = BuildBaseUri(context); OnApplicationConnected(args); _pump.AddHmeConnection(connection); ServerLog.Write(TraceEventType.Verbose, "Exit HmeServer.OnHmeApplicationRequestReceived"); }
private static void ApplicationEventsHandled(IAsyncResult result) { HmeConnection connection = (HmeConnection)result.AsyncState; connection.EndHandleEvent(result); if (connection.Application.IsConnected) { connection.BeginHandleEvent(ApplicationEventsHandled, result.AsyncState); } else { RemoveHmeConnection(connection); } }
void IHmeApplicationPump.AddHmeConnection(HmeConnection connection) { AddHmeConnection(connection); }
internal Application(Host.HmeConnection connection) { _connection = connection; }