Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 2.47 KB

API.md

File metadata and controls

85 lines (61 loc) · 2.47 KB

Modules

SecureFileHost

Functions

createHost(port, key)Host

Create a new host instance

Typedefs

Host : Object

Host instance

SecureFileHost

SecureFileHost.startFileHost(port, [key]) ⇒ HostWithKey

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 : Object

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