- createHost(port, key) ⇒
Host
Create a new host instance
- Host :
Object
Host instance
- SecureFileHost
- static
- .startFileHost(port, [key]) ⇒
HostWithKey
- .startFileHost(port, [key]) ⇒
- inner
- static
Start a new file host
Kind: static method of SecureFileHost
Returns: HostWithKey
- A Host instance with an encryption key
Param | Type | Description |
---|---|---|
port | Number |
The port to listen on |
[key] | String |
The encryption key for encrypting traffic between the host and the client. If not specified a random key will be generated. |
SecureFileHost~HostWithKey : Host
Kind: inner typedef of SecureFileHost
Properties
Name | Type | Description |
---|---|---|
key | String |
The encryption key used on the host |
createHost(port, key) ⇒ Host
Create a new host instance
Kind: global function
Returns: Host
- A new host instance
Param | Type | Description |
---|---|---|
port | Number | undefined |
The port to listen on |
key | String |
The encryption key |
Host instance
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
app | Object |
ExpressJS application instance |
emitter | Object |
Event emitter instance |
server | Object | null |
ExpressJS server instance |
[stop] | function |
Method to stop the host from serving |
cancel | function |
Method to cancel the current connection attempt |