Ben Noordhuis
6fe753022f
unix, windows: add debug mode handle printer
...
Debugging tool, prints a list of active/all handles. Not actively exported.
2012-06-06 04:25:12 +02:00
Bert Belder
64f8cf463d
windows, unix: uv_buf_init should take unsigned int for the buffer length
2012-06-04 18:04:49 +02:00
Ben Noordhuis
171ad8567d
unix, windows: add uv_walk()
...
Lets the libuv user iterate over the open handles. Mostly intended as a
debugging tool or a post-hoc cleanup mechanism.
2012-05-30 02:33:39 +02:00
Bert Belder
58ba2d86e1
Move shared c-ares glue code from uv-common to cares.c
2012-05-22 16:11:23 +02:00
Bert Belder
c06edd4c88
windows, unix: share c-ares glue code
2012-05-22 16:11:22 +02:00
Ben Noordhuis
9efa8b3571
unix, windows: rework reference counting scheme
...
This commit changes how the event loop determines if it needs to stay alive.
Previously, an internal counter was increased whenever a handle got created
and decreased again when the handle was closed.
While conceptually simple, it turned out hard to work with: you often want
to keep the event loop alive only if the handle is actually doing something.
Stopped or inactive handles were a frequent source of hanging event loops.
That's why this commit changes the reference counting scheme to a model where
a handle only references the event loop when it's active. 'Active' means
different things for different handle types, e.g.:
* timers: ticking
* sockets: reading, writing or listening
* processes: always active (for now, subject to change)
* idle, check, prepare: only active when started
This commit also changes how the uv_ref() and uv_unref() functions work: they
now operate on the level of individual handles, not the whole event loop.
The Windows implementation was done by Bert Belder.
2012-05-17 07:07:53 +02:00
Bulat Shakirzyanov
f09f7bc6a8
Add functions to look up req and handle sizes
...
Useful for FFI bindings. Closes #370 .
2012-04-05 01:39:40 +02:00
Ben Noordhuis
87151c8a7b
Use RB_GENERATE_STATIC, not RB_GENERATE_INTERNAL.
2012-03-16 02:35:05 +01:00
Ben Noordhuis
dfda5009c2
unix, win: store ares handles in a binary tree
...
Store the uv_ares_task_t handles in a red-black tree, not a linked list.
Fixes #72 .
2012-03-16 00:49:29 +01:00
Ben Noordhuis
09c722e72b
common: make uv__set_*_error() return -1
...
So you can do `if (errno) return uv__set_sys_error(loop, errno);`.
2012-02-23 05:57:36 -08:00
Igor Zinkovsky
52511b9ddc
windows: implement uv_loop_new+uv_loop_delete
2012-01-16 17:07:49 -08:00
Ben Noordhuis
b52b8c7128
util: add uv_strlcpy() and uv_strlcat() functions
2011-11-23 17:29:02 +01:00
Ben Noordhuis
8e4ed88bbe
Wrap platform thread APIs.
2011-11-21 21:04:16 +01:00
Ryan Dahl
808bb8ed0b
Shared uv_strerror
2011-11-09 18:06:49 -08:00
Ryan Dahl
fd2b04d784
Alternative errno strategy
2011-11-09 17:47:24 -08:00
Ryan Dahl
196e14528f
Map UV_ESRCH in uv_err_name
2011-11-08 16:59:05 -08:00
Ryan Dahl
b7da0a69bf
Add uv__new_artificial_error()
2011-11-08 15:11:16 -08:00
saghul
677bb70bfb
Added missing error codes to uv_err_name
2011-11-04 05:37:56 +01:00
Ryan Dahl
9c7ed0dad0
One more EACCESS -> EACCES
2011-11-03 16:30:19 -07:00
Ryan Dahl
681bd290e6
UV_EACCESS -> UV_EACCES
...
In order to match existing Node API. See
https://github.com/joyent/node/pull/2001
2011-11-03 16:17:12 -07:00
Igor Zinkovsky
74b49e821b
uv_kill
2011-11-02 14:34:07 -07:00
Bert Belder
c985ea4b10
Add uv__new_sys_error
2011-10-29 00:52:33 +02:00
Ben Noordhuis
f2c6b4106d
unix: have uv_strerror() handle getaddrinfo() errors
2011-10-28 01:31:55 +02:00
Ben Noordhuis
197f591ebc
common: add UV_ENOTDIR error code
2011-10-12 16:43:29 +02:00
Ben Noordhuis
61343ecfbd
common: add UV_ENOSYS error code
2011-10-11 23:15:41 +02:00
Erick Tryzelaar
4c329060ca
unix,win: Start unifying shared bind code.
2011-10-04 16:46:39 -07:00
Erick Tryzelaar
85368e8d45
unix,win: Start unifying shared tcp connect code.
2011-10-04 16:46:39 -07:00
Igor Zinkovsky
e7a53aed48
fix windows build
2011-09-28 11:52:08 -07:00
Erick Tryzelaar
23796d208c
Fixes #76 . Unify OS error reporting
...
As a nice fringe benefit, this also shaves a word
off of a windows TCP handle by replacing "uv_err_t
bind_error" with "int bind_error".
2011-09-27 19:05:33 -07:00
Bert Belder
8f563e2963
Revert c-ares upgrade and includes fix
...
It broke the windows build.
This reverts commit 083c97e28b and commit b288afdf14 .
2011-09-27 12:39:55 +02:00
Ben Noordhuis
b288afdf14
common: fix includes
...
Don't rely on c-ares to pull in the headers for inet_addr, net_pton and
inet_ntop. c-ares 1.7.4 did but 1.7.5 does not.
2011-09-26 22:41:17 +02:00
isaacs
3c00d87b42
Add EEXIST handling
...
Additionally, map ERROR_ALREADY_EXISTS to EEXIST on Windows. I'm a bit
unsure about this mapping. Could a windows person confirm?
2011-09-12 16:36:35 -07:00
Ben Noordhuis
b7d88070d8
fs: add UV_ENOENT error code, add test
2011-09-06 00:17:59 +02:00
Ryan Dahl
56dcaf9b06
unix: multiplicity
2011-08-31 04:18:55 +02:00
Ryan Dahl
e5a938f1f4
Add uv_buf_init() constructor
2011-08-17 17:43:19 -07:00
Ben Noordhuis
e8497aee5a
Add error code UV_EPIPE.
2011-08-11 02:45:27 +02:00
Ben Noordhuis
7cc527997f
uv-common: fix 'initialization discards qualifiers from pointer target type'
2011-07-19 13:51:31 +02:00
Ryan Dahl
07b49ce59a
add uv_ip4_name and uv_ip6_name
2011-07-18 17:39:04 -07:00
Ryan Dahl
ce8ff3031c
src/ and include/ directories
...
Helps #71 but does not update the MSVC files.
2011-07-07 07:52:57 -07:00