Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/nvim/mod.ts>sockconnect

๐Ÿ“š Standard module for denops.vim
Go to Latest
function sockconnect
import { sockconnect } from "https://deno.land/x/denops_std@v3.7.0/function/nvim/mod.ts";

Connect a socket to an address. If {mode} is "pipe" then {address} should be the path of a named pipe. If {mode} is "tcp" then {address} should be of the form "host:port" where the host should be an ip adderess or host name, and port the port number. Returns a |channel| ID. Close the socket with |chanclose()|. Use |chansend()| to send data over a bytes socket, and |rpcrequest()| and |rpcnotify()| to communicate with a RPC socket. {opts} is a dictionary with these keys: |on_data| : callback invoked when data was read from socket data_buffered : read socket data in |channel-buffered| mode. rpc : If set, |msgpack-rpc| will be used to communicate over the socket. Returns:

  • The channel ID on success (greater than zero)
  • 0 on invalid arguments or connection failure.

Parameters

denops: Denops
mode: unknown
address: unknown
opts: unknown

Returns

Promise<unknown>