Interface IAppWebHostFactory
- Namespace
- VpnHood.AppLib.App.WebHosting
- Assembly
- VpnHood.AppLib.App.dll
Defines how the app gets its two web hosts (WebHostFactory): the local one this device loads its UI from, and the remote one a phone pairs with, one implementation bound in two ways.
public interface IAppWebHostFactory
Remarks
A head hands the factory in, as a host needs the API to exist first while the app says at its making whether pairing is supported. The app calls each method the first time anything asks for that host, and CreateRemote(WebHostCreateParams) again when the developer's open door is turned on or off, as it then replaces the remote host; it owns and disposes what they return. Everything a host is made with is in WebHostCreateParams, so an implementation needs nothing of the engine, only the API it puts on HTTP.
Methods
CreateLocal(WebHostCreateParams)
Creates the host this device loads its UI from, on loopback, not yet started.
IAppWebHost CreateLocal(WebHostCreateParams createParams)
Parameters
createParamsWebHostCreateParamsWhat the host is made with.
Returns
- IAppWebHost
The host.
CreateRemote(WebHostCreateParams)
Creates the host a phone pairs with, on the LAN's addresses, not yet started.
IAppWebHost CreateRemote(WebHostCreateParams createParams)
Parameters
createParamsWebHostCreateParamsWhat the host is made with.
Returns
- IAppWebHost
The host.