Leonard Hecker
4c90cc8e14
unix: fix typedef of uv_buf_t
...
Typedefs of unnamed structs cannot be forward declared.
Giving the uv_buf_t struct a name makes forward declarations possible.
2014-08-10 17:30:13 +02:00
huxingyi
ca4741b4a5
windows: fix build on MinGW
2014-08-10 12:09:04 +02:00
Andrius Bentkus
0ecee213ea
unix, windows: add uv_recv_buffer_size and uv_send_buffer_size
2014-08-09 11:36:35 +02:00
Jameson Nash
837c62c71b
windows: make uv_read_stop immediately stop reading
...
This implements locking around the blocking call to ReadFile to get
around a Windows kernel bug where a blocking ReadFile operation on a
stream can deadlock the thread. This allows uv_read_stop to immediately
cancel a pending IO operation, and allows uv_pipe_getsockname to
"pause" any pending read (from libuv) while it retrieves the
sockname information.
If unsupported by the OS (pre-Vista), this reverts to the old
(e.g. deadlock-prone) behavior
Closes #1313
2014-08-09 11:10:57 +02:00
Saúl Ibarra Corretgé
02e1ebd40b
include: remove unneeded EADDRINFO errno
...
EADDRINFO is not a readl errno, it was used to signal any error that
getaddrinfo would return, but we return actual errors now.
2014-08-07 21:24:55 +02:00
Saúl Ibarra Corretgé
a9a4872c29
Now working on v0.11.29
2014-08-07 12:21:41 +02:00
Saúl Ibarra Corretgé
fc9e2a0bc4
2014.08.08, Version 0.11.28 (Unstable)
...
Changes since version 0.11.27:
* unix, windows: const-ify handle in uv_udp_getsockname (Rasmus
Pedersen)
* windows: use UV_ECANCELED for aborted TCP writes (Saúl Ibarra
Corretgé)
* windows: add more required environment variables (Jameson Nash)
* windows: sort environment variables before calling CreateProcess
(Jameson Nash)
* unix, windows: move uv_loop_close out of assert (John Firebaugh)
* windows: fix buffer overflow on uv__getnameinfo_work() (lilohuang)
* windows: add uv_backend_timeout (Jameson Nash)
* test: disable tcp_close_accept on Windows (Saúl Ibarra Corretgé)
* windows: read the PATH env var of the child (Alex Crichton)
* include: avoid using C++ 'template' reserved word (Iñaki Baz Castillo)
* include: fix version number (Saúl Ibarra Corretgé)
2014-08-07 12:18:10 +02:00
Saúl Ibarra Corretgé
6bcb799a0d
include: fix version number
2014-08-07 12:17:06 +02:00
Iñaki Baz Castillo
a1ff22cb7e
include: avoid using C++ 'template' reserved word
...
Closes #1394
2014-08-06 12:52:46 +02:00
Rasmus Christian Pedersen
e72d48ddab
unix, windows: const-ify handle in uv_udp_getsockname
2014-07-31 22:27:36 +02:00
Alexis Campailla
6d3a051eb4
windows: relay TCP bind errors via ipc
...
This is the libuv side of the fix for Node's cluster module on Windows.
https://github.com/joyent/node/issues/7691
Windows and Unix return certain socket errors (i.e. EADDRINUSE) at
different times: bind on Windows, and listen on Unix.
In an effort to hide this difference, libuv on Windows stores such
errors in the bind_error field of uv_tcp_t, to defer raising it at
listen time.
This worked fine except for the case in which a socket is shared in
a Node cluster and a bind error occurs.
A previous attempt to fix this (
d1e6be1460
3da36fe00e
) was flawed becaused in an attempt to relay the error at the JS level
it caused the master to start accepting connections.
With this new approach, libuv itself is relaying the bind errors,
providing for a uniform behavior of uv_tcp_listen.
2014-07-31 17:24:40 +02:00
Pavel Platto
e99b89f2ad
unix, windows: add uv_fs_mkdtemp
2014-07-31 09:43:55 +02:00
Andrew Low
cdc979dbe0
aix: improve AIX compatibility
2014-07-22 22:57:24 +02:00
Graham Lee
dc1ea27c73
doc: clarify the return value of uv_default_loop
2014-07-13 11:23:08 +02:00
Iñaki Baz Castillo
bf6e90f4d6
doc: cleanup API documentation in uv.h
2014-07-06 22:33:15 +02:00
mattn
b17223cd60
build: fix build on MinGW32
2014-07-06 20:40:59 +02:00
Andrius Bentkus
b9b386ac5a
doc: grammar, udp documentation fix up
2014-07-05 11:23:48 +02:00
Saúl Ibarra Corretgé
40ad12e5be
unix: return UV_EAGAIN if uv_try_write cannot write any data
2014-07-04 20:45:09 +02:00
Andrius Bentkus
0d43992c3b
unix, win: add uv_udp_try_send
...
The function returns UV_EAGAIN if the queue is not empty and
the message couldn't be sent immediately.
2014-07-04 18:30:33 +02:00
Andrius Bentkus
b769484ca3
unix, win: add send_queue_size and send_queue_count to uv_udp_t
...
This functionality is present in stream and uv_udp_t has a queue
as well so it makes sense for udp to have a send_write_size.
Since udp sends entire messages atomically, the send_queue_count field
lets the user determine how many messages are there left to send.
2014-07-04 18:28:18 +02:00
Andrius Bentkus
d17bfc617e
doc: add documentation to uv_udp_start_recv
2014-07-02 18:49:06 +02:00
Saúl Ibarra Corretgé
4bace4d67c
unix: use struct sockaddr_storage for target UDP addr
2014-06-29 23:52:46 +02:00
Saúl Ibarra Corretgé
8d11aacb79
unix, windows: use the same threadpool implementation
2014-06-27 14:27:04 +02:00
Tim Cooper
546fa7d508
doc: remove duplicate word
2014-06-27 08:16:53 +02:00
Fedor Indutny
4661f2d6c0
Now working on v0.11.27
2014-06-27 04:41:02 +04:00
Fedor Indutny
115281a105
2014.06.28, Version 0.11.26 (Unstable)
...
Changes since version 0.11.25:
* windows: add VT100 codes ?25l and ?25h (JD Ballard)
* windows: add invert ANSI (7 / 27) emulation (JD Ballard)
* unix: fix handling error on UDP socket creation (Saúl Ibarra Corretgé)
* unix, windows: getnameinfo implementation (Rasmus Pedersen)
* heap: fix `heap_remove()` (Fedor Indutny)
* unix, windows: fix parsing scoped IPv6 addresses (Saúl Ibarra
Corretgé)
* windows: fix handling closed socket while poll handle is closing (Saúl
Ibarra Corretgé)
* thread: barrier functions (Ben Noordhuis)
* windows: fix PYTHON environment variable usage (Jay Satiro)
* unix, windows: return system error on EAI_SYSTEM (Saúl Ibarra
Corretgé)
* windows: fix handling closed socket while poll handle is closing (Saúl
Ibarra Corretgé)
* unix: don't run i/o callbacks after prepare callbacks (Saúl Ibarra
Corretgé)
* windows: add tty unicode support for input (Peter Atashian)
* header: introduce `uv_loop_size()` (Andrius Bentkus)
* darwin: invoke `mach_timebase_info` only once (Fedor Indutny)
2014-06-27 04:40:57 +04:00
Saúl Ibarra Corretgé
d4c1228d15
include: const-ify arguments to uv_getnameinfo_cb
2014-06-26 22:46:39 +02:00
Saúl Ibarra Corretgé
029e1273b8
unix: define NI_MAXHOST and NI_MAXSERV if needed
...
OSX only exposes them if _POSIX_C_SOURCE is not defined, for instance.
2014-06-24 10:20:43 +02:00
Andrius Bentkus
e392a1af4d
header: introduce uv_loop_size()
...
We add a function called uv_loop_size which returns the size of
the loop. It is an additional function which complements
`uv_handle_size` and` uv_req_size` in order to provide full FFI
support.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 08:47:17 +04:00
Saúl Ibarra Corretgé
a098ac66dd
unix, windows: return system error on EAI_SYSTEM
2014-06-16 10:09:45 +02:00
Ben Noordhuis
b64c359557
include: document barrier functions
...
Add some basic doc comments to the uv_barrier_*() functions and document
the "serializer" return value from the previous commit.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-07 07:57:09 -07:00
Ben Noordhuis
91985d48f6
unix, windows: make uv_barrier_wait() return bool
...
Make uv_barrier_wait() return a boolean value indicating whether this
thread was the "serializer".
From `man pthread_barrier_wait`:
Upon successful completion, the pthread_barrier_wait() function
shall return PTHREAD_BARRIER_SERIAL_THREAD for a single (arbitrary)
thread synchronized at the barrier and zero for each of the other
threads.
Exposing that information from libuv is useful because it can make
cleanup significantly easier:
if (uv_barrier_wait(&barrier) > 0)
uv_barrier_destroy(&barrier);
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-07 07:57:08 -07:00
Saúl Ibarra Corretgé
aab8d9dab4
doc: clarify return value when UV_RUN_NOWAIT is used
...
Signed-off-by: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-05-25 23:39:40 +02:00
Rasmus Christian Pedersen
70c42563c1
unix, windows: getnameinfo implementation
...
Closes #852
2014-05-20 17:33:52 +02:00
Rasmus Christian Pedersen
ecaede660c
unix, windows: uv_dlerror const argument
2014-05-13 00:00:54 +02:00
Saúl Ibarra Corretgé
fa0e1e5071
unix, windows: remove unneeded define
2014-05-08 09:08:33 +02:00
Trevor Norris
32597100b8
thread: add uv_thread_cb typedef
...
To keep with convention, add a typedef for the function called that
initializes the new thread.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-02 01:33:13 +04:00
Timothy J Fontaine
b5548f18c9
Now working on v0.11.26
2014-05-01 09:16:48 -07:00
Timothy J Fontaine
2acd544cff
2014.05.02, Version 0.11.25 (Unstable)
...
Changes since version 0.11.24:
* osx: pass const handle pointer to uv___stream_fd (Chernyshev
Viacheslav)
* unix, windows: pass const handle ptr to uv_tcp_get*name (Chernyshev
Viacheslav)
* common: pass const sockaddr ptr to uv_ip*_name (Chernyshev Viacheslav)
* unix, windows: validate flags on uv_udp|tcp_bind (Saúl Ibarra
Corretgé)
* unix: handle case when addr is not initialized after recvmsg (Saúl
Ibarra Corretgé)
* unix, windows: uv_now constness (Rasmus Pedersen)
2014-05-01 09:16:45 -07:00
Rasmus Christian Pedersen
87ae69b638
unix, windows: uv_now constness
...
uv_now doesnt require modification of uv_loop_t as such argument is
changed to a const uv_loop_t* as this more in spirit with remaining
API in libuv.
2014-04-29 19:39:13 -03:00
Saúl Ibarra Corretgé
76eb7518c6
doc: clarify what the addr argument of uv_udp_recv_cb contains
2014-04-23 19:28:30 +02:00
Saúl Ibarra Corretgé
d86d86633e
doc: clarify uv_try_write return values
2014-04-22 08:41:16 +02:00
Chernyshev Viacheslav
20d092edc8
common: pass const sockaddr ptr to uv_ip*_name
...
uv_ip4_name and uv_ip6_name do not modify passed sockaddr pointer,
so there is no need to keep this parameter non-const.
2014-04-18 12:07:38 +02:00
Chernyshev Viacheslav
886e2bcd55
unix, windows: pass const handle ptr to uv_tcp_get*name
...
uv_tcp_getsockname and uv_tcp_getpeername do not modify passed handle
pointer, so there is no need to keep this parameter non-const.
2014-04-18 12:07:38 +02:00
Trevor Norris
f212ceffae
include: reorder UV_HANDLE_PRIVATE_FIELDS
...
The fields for UV_HANDLE_PRIVATE_FIELDS in uv-win.h and uv-unix.h are
the same, but in different order. Simply swap them so uv_handle_t are
the same on both platforms.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-04-17 14:31:23 +04:00
Timothy J Fontaine
1daff47ae9
Now working on v0.11.25
2014-04-14 09:56:52 -07:00
Timothy J Fontaine
ed948c29f6
2014.04.15, Version 0.11.24 (Unstable)
...
Changes since version 0.11.23:
* linux: reduce file descriptor count of async pipe (Ben Noordhuis)
* sunos: support IPv6 qualified link-local addresses (Saúl Ibarra
Corretgé)
* windows: fix opening of read-only stdin pipes (Alexis Campailla)
* windows: Fix an infinite loop in uv_spawn (Alex Crichton)
* windows: fix console signal handler refcount (李港平)
* inet: allow scopeid in uv_inet_pton (Fedor Indutny)
* win: always leave crit section in get_proc_title (Fedor Indutny)
2014-04-14 09:56:49 -07:00
Fedor Indutny
6a657dcbee
include: add reserved field for #926
...
Introduce reserved field to be able to fix #926 after v0.12 release.
2014-04-14 20:44:49 +04:00
Saúl Ibarra Corretgé
2c02c4ee1e
sunos: support IPv6 qualified link-local addresses
2014-04-09 19:40:01 +02:00
Fedor Indutny
842c70c5c5
Now working on v0.11.24
...
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-04-07 15:39:10 +04:00