The host class. Receives a stream from the HTTP server caller and dispatches the specified server.
Inheritance: Goedel.Recrypt.RecryptServiceProvider
Example #1
0
        // To run, it is necessary to first set permissions (as root)
        // netsh http add urlacl url=http://+:80/.well-known user=VOODOO\Phillip

        // netsh http add urlacl url="http://recrypt.prismproof.org:80/.well-known/RecryptService/" user=VOODOO\Phillip

        /// <summary>
        /// Start the server
        /// </summary>
        /// <param name="Options"></param>
        public override void Start(Start Options) {

            // Create the provider object.
            var ServiceProvider = new PublicRecryptServiceProvider(Options.Address.Value, 
                Options.PortalStore.Value);


            // Create the server, add the provider, create service port.
            var Server = new JPCServer();
            var HostReg = Server.Add(ServiceProvider);

            // Create the interface dispatcher for the provider.
            var Interface = new PublicRecryptService(ServiceProvider, null);
            var InterfaceReg = HostReg.Add (Interface);

            // Register the network port.
            var PortReg = InterfaceReg.AddService(Options.Address.Value);

            // Run until abort
            Server.RunBlocking();
            }
 /// <summary>
 /// The mesh service dispatcher.
 /// </summary>
 /// <param name="Host">The service provider.</param>
 /// <param name="Session">The authentication context.</param>
 public PublicRecryptService(PublicRecryptServiceProvider Host, JPCSession Session) {
     this.Provider = Host;
     Host.Interfaces.Add(this);
     Host.Service = this;
     //this.JPCSession = Session;
     }
 /// <summary>
 /// Create new portal using the default stores.
 /// </summary>
 public RecryptPortalLocal() {
     RecryptServiceHost = new PublicRecryptServiceProvider(ServiceName, PortalStore);
     }
 /// <summary>
 /// Initialize the portal
 /// </summary>
 /// <param name="ServiceName"></param>
 /// <param name="MeshStore"></param>
 /// <param name="PortalStore"></param>
 protected void Init(string ServiceName, string PortalStore) {
     this.ServiceName = ServiceName;
     this.PortalStore = PortalStore;
     RecryptServiceHost = new PublicRecryptServiceProvider(ServiceName, PortalStore);
     }