aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event/socket.c
Commit message (Collapse)AuthorAge
* docs: miscdundargoc2025-01-30
| | | | | | | | | Co-authored-by: Dustin S. <dstackmasta27@gmail.com> Co-authored-by: Ferenc Fejes <fejes@inf.elte.hu> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: brianhuster <phambinhanctb2004@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fixup: apply the change on more filesJames Tirta Halim2024-06-04
|
* refactor(io): separate types for read and write streamsbfredl2024-05-31
| | | | | | | | | | | | This is a structural refactor with no logical changes, yet. Done in preparation for simplifying rstream/rbuffer which will require more state inline in RStream. The initial idea was to have RStream and WStream as sub-types symetrically but that doesn't work, as sockets are both reading and writing. Also there is very little write-specific state to start with, so the benefit of a separate WStream struct is a lot smaller. Just document what fields in `Stream` are write specific.
* refactor(IWYU): fix headersdundargoc2024-01-11
| | | | | | Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
* refactor: run IWYU on entire repodundargoc2023-12-21
| | | | Reference: https://github.com/neovim/neovim/issues/6371.
* refactor: move non-symbols to defs.h headersdundargoc2023-12-17
|
* refactor: change event_create() to a macro (#26343)zeertzjq2023-12-01
| | | A varargs functions can never be inlined, so a macro is faster.
* build: don't define FUNC_ATTR_* as empty in headers (#26317)zeertzjq2023-11-30
| | | | | | FUNC_ATTR_* should only be used in .c files with generated headers. Defining FUNC_ATTR_* as empty in headers causes misuses of them to be silently ignored. Instead don't define them by default, and only define them as empty after a .c file has included its generated header.
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
|
* build(IWYU): replace most private mappings with pragmas (#26247)zeertzjq2023-11-27
|
* refactor: iwyu (#26062)zeertzjq2023-11-16
|
* build: remove PVSdundargoc2023-11-12
| | | | | | | We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
* build(lint): remove unnecessary clint.py rulesdundargoc2023-10-23
| | | | | Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py.
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* refactor: replace char_u with charDundar Göc2022-08-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* refactor: fix clint warnings (#17682)dundargoc2022-03-13
|
* refactor: format files with uncrustify #15663dundargoc2021-09-14
|
* rename: getdigits_safe => try_getdigitsJustin M. Keyes2019-09-13
|
* deps: update to libuv v1.26.0Justin M. Keyes2019-02-21
| | | | | | | | | | | | | | | | | | | | | | | Notable changes since v1.23.2: - v1.26.0 - uv_os_uname() - unix: don't attempt to invalidate invalid fd https://github.com/libuv/libuv/commit/1ce6393a5780538ad8601cae00c5bd079b9415a9 - v1.25.0 - unix: better handling of unsupported F_FULLFSYNC (fixes #6725) https://github.com/libuv/libuv/commit/6fc797c3fe18d8df71b36ecf2184f085c0283251 - tty,win: fix Alt+key under WSL https://github.com/libuv/libuv/commit/d2e59bb6003d707bdebd7a381f5a7e1d0cc3fd3b - fsevents: really watch files with fsevents on macos 10.7+ https://github.com/libuv/libuv/commit/2d2af382ce84b91d6ee7a185af32fca7f0acd84b - win: fix duplicate tty vt100 fn key - v1.24.0 - win,fs: retry if uv_fs_rename fails https://github.com/libuv/libuv/commit/e94c184c7c4a18f3de569c97caeb83f4ff98a4b2 - later [reverted](https://github.com/libuv/libuv/issues/2098) but may be useful reference - win: support more fine-grained windows hiding https://github.com/libuv/libuv/commit/4c2dcca27b80945d6b7063f0ea031b8a75a46a52
* socket.c: Ignore PVS/V547: False positiveJustin M. Keyes2018-05-20
| | | | https://github.com/neovim/neovim/pull/8218#issuecomment-383412049
* socket: Silence V641: buf size is not multiple of what it is cast toZyX2017-07-04
|
* socket.c: Disable Nagle's algorithm on TCP sockets (#6915)David Galeano2017-06-27
| | | | Reducing latency is more interesting than optimizing bandwidth for Nvim's typical use-cases.
* channels: implement sockopen() to connect to socketBjörn Linse2017-05-29
| | | | Helped-By: oni-link <knil.ino@gmail.com>
* socket_watcher_start: Silence conversion warning for sin(6)_portJames McCoy2017-05-28
| | | | | | | Although in_port_t is a typedef for uint16_t, GCC in Ubuntu 12.04 complains about potential loss of data due to converting int to uint16_t. Since we know this isn't possible, silence the warning to avoid breaking QB until it gets upgraded to a newer Ubuntu.
* Server: Call uv_getaddrinfo with NULL service when no portJames McCoy2017-05-27
| | | | | | | | | | When using serverstart("ip.ad.d.r:") to listen on a random port, we need to abide by getaddrinfo()'s API and pass in a NULL service, rather than an empty string. When given an empty string, getaddrinfo() is free to search for a service by the given name (since the string isn't a number) which will fail. At least FreeBSD does perform this lookup.
* Server: don't fall back to Unix socketsMarco Hinz2017-05-22
|
* Server: use uv_getaddrinfo() for $NVIM_LISTEN_ADDRESSMarco Hinz2017-05-22
| | | | | | | | | | | | | | | | | | | This change implicitly adds IPv6 support. If the address contains ":", we try to use a TCP socket instead of a Unix domain socket. Everything in front of the last occurrence of ":" is the hostname and everything after it the port. If the hostname lookup fails, we fall back to using a Unix domain socket. If the port is empty ("localhost:"), a random port will be assigned. Examples: NVIM_LISTEN_ADDRESS=localhost:12345 -> TCP (IPv4 or IPv6), port: 12345 NVIM_LISTEN_ADDRESS=localhost: -> TCP (IPv4 or IPv6), port: random (> 1024) NVIM_LISTEN_ADDRESS=localhost:0 -> TCP (IPv4 or IPv6), port: random (> 1024) NVIM_LISTEN_ADDRESS=localhost -> Unix domain socket "localhost" in current dir
* *: Fix all V641 errorsZyX2017-05-20
|
* *: Add comment to all C filesZyX2017-04-19
|
* stream: set data together with callbackBjörn Linse2016-08-20
|
* os/fs: Rename os_file_exists to os_path_exists (#4973)Daniel Xu2016-07-06
| | | | Because the old name did not indicate that the function would return true on directories as well.
* Fix comments for os_* functions return valueRui Abreu Ferreira2015-11-25
| | | | | | In windows libuv does not return -errno, instead it uses negative error codes e.g. UV_ENOENT. This commit changes the comments in os_* functions to reflect this.
* event: Refactor async event processingThiago de Arruda2015-08-13
| | | | | | | | | | - Improve the implementation of deferred/immediate events. - Use the new queue module to change how/when events are queued/processed by giving a private queue to each emitter. - Immediate events(which only exist to break uv_run recursion) are now represented in the `loop->fast_events` queue. - Events pushed to child queues are propagated to the event loop main queue and processed as K_EVENT keys.
* events: Add missing function attributes to some APIsThiago de Arruda2015-08-13
|
* server: Extract most logic into the new socket abstractionThiago de Arruda2015-07-17
- Move event loop code into event/socket - Reimplement server.c on top of the new SocketWatcher class - Adapt msgpack_rpc/channel.c