Constructor
new WebSocketSessionStrategy(session, sdk)
Create a new WebSocket strategy instance
Parameters:
| Name | Type | Description |
|---|---|---|
session | Session | The session instance |
sdk | AssisfySDK | The SDK instance |
Members
sdk :AssisfySDK
Type:
session :Session
Type:
sessionId :string
Type:
- string
websocket :WebSocket
Type:
- WebSocket
Methods
close(code, reason)
Close the WebSocket connection
Parameters:
| Name | Type | Description |
|---|---|---|
code | number | The close code |
reason | string | The reason for closing |
handleInput(inputopt)
Handle user input
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
input | string | <optional> | '' | The user input |
handlePermissionRequest(grantedopt)
Handle a permission request
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
granted | boolean | <optional> | false | Whether to grant the permission |