Module @mdf.js/socket-client-provider

@mdf.js/socket-client-provider

Node Version Typescript Version Known Vulnerabilities Documentation

netin

Mytra Development Framework - @mdf.js/socket-client-provider

Typescript tools for development

Socket client provider for @mdf.js based on socket.io-client.

Using npm:

npm install @mdf.js/socket-client-provider

Using yarn:

yarn add @mdf.js/socket-client-provider

Check information about @mdf.js providers in the documentation of the core module @mdf.js/core.

Checks included in the provider:

  • status: Check the status of the connection to the socket-io server based on the connection and disconnection events from the socket-io client.
    • observedValue: actual state of the consumer/producer provider instance [error, running, stopped] based in the last ping event. stopped if the provider is stopped or has not been initialized yet, running if the provider is running and connected to the server, error if the provider is running but disconnected from the server.
    • status: pass if the status is running, warn if the status is stopped, fail if the status is error.
  • CONFIG_SOCKET_IO_CLIENT_URL (default: 'http://localhost:8080'): URL of the server
  • CONFIG_SOCKET_IO_CLIENT_PATH (default: '/socket.io'): Path where the server will listen
  • CONFIG_SOCKET_IO_CLIENT_TRANSPORTS (default: ['websocket']): Transports to use
  • CONFIG_SOCKET_IO_CLIENT_CA_PATH (default: undefined): CA file path
  • CONFIG_SOCKET_IO_CLIENT_CLIENT_CERT_PATH (default: undefined): Client cert file path
  • CONFIG_SOCKET_IO_CLIENT_CLIENT_KEY_PATH (default: undefined): Client key file path

Copyright 2024 Mytra Control S.L. All rights reserved.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.

Namespaces

SocketIOClient