UNPKG

@push.rocks/smartproxy

Version:

A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.

23 lines (22 loc) 894 B
/** * WebSocket utility functions * * This module provides smartproxy-specific WebSocket utilities * and re-exports protocol utilities from the protocols module */ export type { RawData } from '../../protocols/websocket/index.js'; /** * Get the length of a WebSocket message regardless of its type * (handles all possible WebSocket message data types) * * @param data - The data message from WebSocket (could be any RawData type) * @returns The length of the data in bytes */ export declare function getMessageSize(data: import('../../protocols/websocket/index.js').RawData): number; /** * Convert any raw WebSocket data to Buffer for consistent handling * * @param data - The data message from WebSocket (could be any RawData type) * @returns A Buffer containing the data */ export declare function toBuffer(data: import('../../protocols/websocket/index.js').RawData): Buffer;