Skip to content

Add support for Unix-domain sockets#10062

Closed
LemonBoy wants to merge 7 commits intovim:masterfrom
LemonBoy:channel-unix
Closed

Add support for Unix-domain sockets#10062
LemonBoy wants to merge 7 commits intovim:masterfrom
LemonBoy:channel-unix

Conversation

@LemonBoy
Copy link
Contributor

@LemonBoy LemonBoy commented Apr 2, 2022

As written on the tin this PR allows Vim channels to connect to Unix-domain sockets, much nicer than TCP for local tasks and possibly faster (?).

Open questions:

  • The documentation could be better (suggestions welcome)
  • The port argument is omitted in ch_info, is that better than returning a meaningless value (empty string or zero)?
  • Should ch_info return any info about the kind of socket it's connected to (ipv4, ipv6, unix)?
  • The whole thing should work on recent Windows 10 versions, testing is needed though.

LemonBoy added 4 commits April 2, 2022 15:46
Some distributions (eg. Debian 11) do not symlink 'python' to 'python3'
so look for both of them before giving up.
Any path prefixed with 'unix:' will do.
Written and tested on Linux only, should be relatively easy to have it
work on recent Windows 10 versions with some small changes.
@LemonBoy
Copy link
Contributor Author

LemonBoy commented Apr 2, 2022

No idea what's wrong with the CI, the python script and the test suite both work fine on my system.

@brammool
Copy link
Contributor

brammool commented Apr 2, 2022

Perhaps ch_info() can return port zero to indicate a unix-domain socket?
The hostname is already used for the path, that combination would make sense.
Otherwise the info should have "path" and omit hostname and port.

@brammool
Copy link
Contributor

brammool commented Apr 3, 2022

Tests are still failing.

@LemonBoy
Copy link
Contributor Author

LemonBoy commented Apr 3, 2022

The tests are ok now, the CI failure is unrelated as master is also red right now.

@brammool brammool closed this in cc766a8 Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants