mirror of
https://github.com/aurora-opensource/xviz.git
synced 2026-01-18 14:07:46 +00:00
1.3 KiB
1.3 KiB
XVIZHandler Interface
An XVIZHandler will be called to provide an XVIZSession to handle the request made to the XVIZServer.
Interface
async newSession(socket, request)
Using the socket and request a handler must decide if this connection can be handled.
Parameters:
socket(Object) - The socket from the serverrequest(Object) - The request object from the server
Returns: (XVIZSession|null) - A session to handle this connection or null if the request cannot be handled.
XVIZProviderHandler Example
The xvizserver tool uses this modules XVIZProviderHandler implementation to host XVIZ data.
Below we can see the flow where the XVIZProviderHandler uses an array of directories and then calls the XVIZProviderFactory to attempt to satisfy the request and returns the XVIZProviderSession upon a successful find.
Diagram of the flow for how the XVIZProviderHandler creates an XVIZProviderSession
