WebsockexNova.Client.Handlers (WebsockexNova v0.1.1)

View Source

Utility functions for registering various handler behaviors with WebsockexNova connections.

This module provides helper functions to set up behavior handlers for WebSocket connections, ensuring that appropriate defaults are used when not explicitly provided.

Summary

Functions

Configures handlers for a WebSocket connection based on the adapter module.

Functions

configure_handlers(adapter, options)

@spec configure_handlers(module(), map()) :: map()

Configures handlers for a WebSocket connection based on the adapter module.

This function examines the adapter module to determine which behaviors it implements, and configures the connection options accordingly. For any behavior not implemented by the adapter, it falls back to the default implementation.

Parameters

  • adapter - Module implementing one or more WebsockexNova behaviors
  • options - Connection options (may already contain handler configurations)

Returns

  • Updated options map with all handler configurations