|
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 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -132,7 +132,7 @@ Start Vim and create a listening channel: > |
132 | 132 | endfunc |
133 | 133 |
|
134 | 134 | " Start listening on port 8765 |
135 | | - let server = ch_listen('localhost:8765', {"callback": "OnAccept"}) |
| 135 | + let server = ch_listen('8765', {"callback": "OnAccept"}) |
136 | 136 |
|
137 | 137 | From another Vim instance (or any program) you can connect to it: > |
138 | 138 | let channel = ch_open('localhost:8765') |
@@ -637,8 +637,7 @@ ch_info({handle}) *ch_info()* |
637 | 637 | "status" "open", "buffered" or "closed", like |
638 | 638 | ch_status() |
639 | 639 | 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 |
642 | 641 | "path" the path of the Unix-domain socket |
643 | 642 | "sock_status" "open" or "closed" |
644 | 643 | "sock_mode" "NL", "RAW", "JSON" or "JS" |
@@ -668,14 +667,15 @@ ch_info({handle}) *ch_info()* |
668 | 667 | Return type: dict<any> |
669 | 668 |
|
670 | 669 | 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. |
674 | 673 | Returns a Channel. Use |ch_status()| to check for failure. |
675 | 674 |
|
676 | 675 | {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. |
679 | 679 | Note: IPv6 is not yet supported. |
680 | 680 |
|
681 | 681 | If {options} is given it must be a |Dictionary|. |
|
0 commit comments