Hyperlinkv0.8.0-beta.28

Hyperlink

Source src/Hyperlink.ts:425914 lines
const unix = <Self>(
  node: NodeKey<Self> & { readonly path?: string; readonly endpoints?: Endpoints },
  options?: {
    readonly path?: string;
    readonly serialization?: Layer.Layer<RpcSerialization.RpcSerialization>;
  },
): Layer.Layer<Self, UnaddressedNode> => {
  // The client sibling of {@link Node.unix} — dial a Unix-domain ipc path.
  const sock = options?.path ?? node.endpoints?.IpcSocket?.path ?? node.path;
  if (sock === undefined) {
    return unaddressedLayer(node.key);
  }
  return connectLayer(node, protocolIpc(sock, options?.serialization));
};
Referenced by 1 symbols