예제 #1
0
        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");
        }
예제 #2
0
            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);
                }
            }
예제 #3
0
 void IHmeApplicationPump.AddHmeConnection(HmeConnection connection)
 {
     AddHmeConnection(connection);
 }
예제 #4
0
 internal Application(Host.HmeConnection connection)
 {
     _connection = connection;
 }