new TermServer()
A server for terminal based applications.
- Source:
Methods
actualPort() → {number}
The actual port the server is listening on. This is useful if you bound the server specifying 0 as port number
signifying an ephemeral port
- Source:
Returns:
the actual port the server is listening on.
- Type
- number
authProvider(provider) → {TermServer}
Set an auth provider to use, any provider configured in options will override this provider. This should be used
when a custom auth provider should be used.
Parameters:
Name | Type | Description |
---|---|---|
provider |
AuthProvider | the auth to use |
- Source:
Returns:
this object
- Type
- TermServer
close(completionHandler)
Like TermServer#close but supplying a handler that will be notified when close is complete.
Parameters:
Name | Type | Description |
---|---|---|
completionHandler |
function | the handler to be notified when the term server is closed |
- Source:
listen(listenHandler) → {TermServer}
Bind the term server, the TermServer#termHandler must be set before.
Parameters:
Name | Type | Description |
---|---|---|
listenHandler |
function | the listen handler |
- Source:
Returns:
this object
- Type
- TermServer
termHandler(handler) → {TermServer}
Set the term handler that will receive incoming client connections. When a remote terminal connects
the
handler
will be called with the Term which can be used to interact with the remote
terminal.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the term handler |
- Source:
Returns:
this object
- Type
- TermServer