Skip to content

Commit 9422ec6

Browse files
authored
Merge pull request #2577 from h-east/update-channel
Update channel.{txt,jax}
2 parents 528901e + 32b6ec4 commit 9422ec6

2 files changed

Lines changed: 19 additions & 20 deletions

File tree

doc/channel.jax

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*channel.txt* For Vim バージョン 9.2. Last change: 2026 Apr 06
1+
*channel.txt* For Vim バージョン 9.2. Last change: 2026 Apr 14
22

33

44
VIM リファレンスマニュアル by Bram Moolenaar
@@ -131,7 +131,7 @@ Vimを起動し、リスニングチャネルを作成する: >
131131
endfunc
132132
133133
" ポート 8765 でリッスンを開始する
134-
let server = ch_listen('localhost:8765', {"callback": "OnAccept"})
134+
let server = ch_listen('8765', {"callback": "OnAccept"})
135135
136136
別の Vim インスタンス (または任意のプログラム) から接続できる: >
137137
let channel = ch_open('localhost:8765')
@@ -633,8 +633,7 @@ ch_info({handle}) *ch_info()*
633633
"status" ch_status() と同様に、"open", "buffered" ま
634634
たは "closed"
635635
ch_open() で開いた場合:
636-
"hostname" アドレスのホスト名
637-
"port" アドレスのポート
636+
"port" ループバック上のポート
638637
"path" Unix ドメインソケットのパス
639638
"sock_status" "open" または "closed"
640639
"sock_mode" "NL", "RAW", "JSON" または "JS"
@@ -664,21 +663,21 @@ ch_info({handle}) *ch_info()*
664663
戻り値の型: dict<any>
665664

666665
ch_listen({address} [, {options}]) *E1573* *E1574* *ch_listen()*
667-
着信チャネル接続を {address} で待機する。
668-
これは、既存のサーバーに接続する |ch_open()| とは異なり、サー
669-
バー側のチャネルを作成する。
670-
666+
ループバックのポート、または UNIX ドメインソケットの {address}
667+
で、チャネル接続の着信を待機する。これは、既存のサーバーに接続
668+
する |ch_open()| とは異なり、サーバー側のチャネルを作成する。
671669
チャネルを返す。|ch_status()| を使用して、失敗したかどうかを確
672670
認すること。
673671

674672
{address} は文字列である。受け入れられる形式については
675-
|channel-address| を参照。ただし、セキュリティ上の理由から、す
676-
べてのインターフェイスにバインドすることはできません。
673+
|channel-address| を参照。ただし、TCP ソケットの場合はポートの
674+
みを設定でき、セキュリティ上の理由からループバックアドレスにバ
675+
インドされる。
677676
Note: IPv6 はまだサポートされていない。
678677

679678
{options} が指定されている場合は、|Dictionary| である必要があ
680679
る。
681-
|channel-open-options| を参照
680+
|channel-open-options| を参照
682681
{options} の "callback" は、新しい接続が受け入れられたときに呼
683682
び出される。このコールバックは、新しいチャネルとクライアントア
684683
ドレス (文字列形式、例: "127.0.0.1:12345") の 2 つの引数を受け

en/channel.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*channel.txt* For Vim version 9.2. Last change: 2026 Apr 06
1+
*channel.txt* For Vim version 9.2. Last change: 2026 Apr 14
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -132,7 +132,7 @@ Start Vim and create a listening channel: >
132132
endfunc
133133
134134
" Start listening on port 8765
135-
let server = ch_listen('localhost:8765', {"callback": "OnAccept"})
135+
let server = ch_listen('8765', {"callback": "OnAccept"})
136136
137137
From another Vim instance (or any program) you can connect to it: >
138138
let channel = ch_open('localhost:8765')
@@ -637,8 +637,7 @@ ch_info({handle}) *ch_info()*
637637
"status" "open", "buffered" or "closed", like
638638
ch_status()
639639
When opened with ch_open():
640-
"hostname" the hostname of the address
641-
"port" the port of the address
640+
"port" the port on loopback
642641
"path" the path of the Unix-domain socket
643642
"sock_status" "open" or "closed"
644643
"sock_mode" "NL", "RAW", "JSON" or "JS"
@@ -668,14 +667,15 @@ ch_info({handle}) *ch_info()*
668667
Return type: dict<any>
669668

670669
ch_listen({address} [, {options}]) *E1573* *E1574* *ch_listen()*
671-
Listen on {address} for incoming channel connections.
672-
This creates a server-side channel, unlike |ch_open()|
673-
which connects to an existing server.
670+
Listen on {address} - port on loopback or UNIX domain socket
671+
for incoming channel connections. This creates a server-side
672+
channel, unlike |ch_open()|which connects to an existing server.
674673
Returns a Channel. Use |ch_status()| to check for failure.
675674

676675
{address} is a String, see |channel-address| for the possible
677-
accepted forms, however binding to all interfaces is not
678-
allowed for security reasons.
676+
accepted forms, however in case of TCP sockets it allows to
677+
set only a port and binds to loopback address for
678+
security reasons.
679679
Note: IPv6 is not yet supported.
680680

681681
If {options} is given it must be a |Dictionary|.

0 commit comments

Comments
 (0)