{#if connected} connected{wsLogs.handshake[tab.key]?.hs.protocol ? ` · ${wsLogs.handshake[tab.key].hs.protocol}` : ''} {:else if connecting} connecting… {:else} {/if} {events.filter((e) => e.dir === 'in').length} in · {events.filter((e) => e.dir === 'out').length} out
{#key ws.layout}
{#if section === 'message'}
{#each ['json', 'text', 'hex'] as f} {/each}
{#if format === 'json'} {:else} send()} /> {/if}
{#if spec.messages?.length}
Saved messages
{#each spec.messages as m, i (i)}
{m.format} {m.content.replace(/\s+/g, ' ')}
{/each}
{/if}
{:else if section === 'headers'}
Subprotocols
(spec.subprotocols = t)} />
{:else if section === 'auth'}
{:else if section === 'settings'}
Reconnect automatically
After the server closes, retry with 1, 2, 4 … 30 s pauses
(spec.auto_reconnect = v || undefined)} aria-label="Reconnect" />
{:else if section === 'handshake'}
{#if wsLogs.authFailure[tab.key]} {:else if wsLogs.handshake[tab.key]} {@const h = wsLogs.handshake[tab.key]}
HTTP {h.hs.status} in {Math.round(h.hs.ms)} ms · {h.hs.url}
Sent
{#each h.hs.request_headers as [k, v]}
{k}{ws.maskSecrets && /authorization|cookie/i.test(k) ? '••••••' : v}
{/each}
Received
{#each h.hs.response_headers as [k, v]}
{k}{v}
{/each} {#if h.auth.kind && h.auth.kind !== 'none'}
{/if} {:else}

Connect to see the handshake.

{/if}
{/if}
{#each ['all', 'in', 'out'] as f} {/each}
{#each shown as e (e.id)} {@const json = expanded.has(e.id) ? asJson(e) : null}
{#if json}
{/if}
{:else}

{connected ? 'No messages yet.' : 'Connect, then send a message with Ctrl+Enter.'}

{/each}
{/key}