// 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://prismproof.org:80/.well-known/MeshService/" user=VOODOO\Phillip /// <summary> /// Start the mesh server /// </summary> /// <param name="Options"></param> public override void Start(Start Options) { // Create the provider object. var MeshServiceProvider = new PublicMeshServiceProvider(Options.Address.Value, Options.MeshStore.Value, Options.PortalStore.Value); // Create the server, add the provider, create service port. var Server = new JPCServer(); var HostReg = Server.Add(MeshServiceProvider); // Create the interface dispatcher for the provider. var Interface = new PublicMeshService(MeshServiceProvider, null); var InterfaceReg = HostReg.Add (Interface); // Register the network port. InterfaceReg.AddService(Options.Address.Value); // Run until abort Server.RunBlocking(); }
/// <summary> /// Return a MeshService object for the named portal service. /// </summary> /// <param name="Account">The account to get.</param> /// <param name="Portal">The portal to get the service from.</param> /// <returns>The service instance</returns> public override MeshService GetService(string Portal, string Account) { var Session = new DirectSession(null); MeshServiceClient = new PublicMeshService(MeshServiceHost, Session); return MeshServiceClient; }