INNER CODE UNIT · TypeScript

describeCommandPacket

voxelize/voxelize · packages/core/src/core/network/index.ts:77

function describeCommandPacket(packet: MessageProtocol): string {
  if (packet.type === "METHOD") {
    const name = (packet as { method?: { name?: string } }).method?.name;
    return name ? `METHOD:${name}` : "METHOD";
  }
  return String(packet.type);
}

export type NetworkConnectionOptions = {
  /**
   * Milliseconds between reconnection attempts after the socket drops.
   * Defaults to {@link DEFAULT_RECONNECT_TIMEOUT_MS}; pass 0 to disable
   * automatic reconnection.
   */
  reconnectTimeout?: number;
  secret?: string;
  useWebRTC?: boolean;
  /**

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…