listProtocols
function listProtocols(target): Promise<HostedProtocol[]>;Defined in: src/client/introspect.ts:516
List the protocols a server hosts, over a client the caller already holds.
One round trip – vgi_rpc.Reflection.v1.list_protocols – on target’s
own connection; nothing new is opened and nothing is closed. Over HTTP the
call shares the client’s fetch, prefix, authorization, session scope,
compression and response budget; over a byte-stream transport (pipe,
subprocess, TCP, Iroh) it shares the client’s stream, which the server
demultiplexes by each request’s protocol key – so, like any other call on
such a client, it cannot run while a stream is open on it.
target may be bound to any protocol the server hosts; only its connection
matters.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
target |
RpcClient |
Returns
Section titled “Returns”Promise<HostedProtocol[]>
One HostedProtocol per hosted protocol, in the server’s order.
Throws
Section titled “Throws”The server does not host reflection. The connection is still usable.
Throws
Section titled “Throws”Any other server error, or a transport failure.
