Class VpnHoodAppWebHostFactory
Provides the app's web hosts, which serve the app's API over HTTP, and the UI's files where they are supplied: the local one, on the loopback, for the app itself, and the remote one, on the local network, for another device, which pairs where a token is required.
public class VpnHoodAppWebHostFactory : IAppWebHostFactory
- Inheritance
-
VpnHoodAppWebHostFactory
- Implements
- Inherited Members
Remarks
A head names this factory in its app options; the app decides when each host is first needed and tells it what to serve in WebHostCreateParams. Nothing is configured here. A host binds nothing until it is first started.
Methods
CreateLocal(WebHostCreateParams)
Creates the local web host, which binds the loopback for the app itself.
public IAppWebHost CreateLocal(WebHostCreateParams createParams)
Parameters
createParamsWebHostCreateParamsWhat the host serves, and the settings it serves it with.
Returns
- IAppWebHost
The host, not started yet.
CreateRemote(WebHostCreateParams)
Creates the remote web host, which tries to bind the device's IPv4 local network addresses, skipping any that fail, for another device on the network.
public IAppWebHost CreateRemote(WebHostCreateParams createParams)
Parameters
createParamsWebHostCreateParamsWhat the host serves, and the settings it serves it with.
Returns
- IAppWebHost
The host, not started yet.