Commit Graph

29 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
cdc10a907a test: remove LOG and LOGF variadic macros
Initial patch by @simar7, thanks!

PR-URL: https://github.com/libuv/libuv/pull/313
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-12 18:44:34 +02:00
Ben Noordhuis
f5baf210df test: wrap long lines at 80 columns 2013-09-11 17:29:43 +02:00
Ben Noordhuis
5c675c4a4e include: merge uv_tcp_connect and uv_tcp_connect6
Merge uv_tcp_connect6() into uv_tcp_connect().  uv_tcp_connect() now
takes a const struct sockaddr*.
2013-09-04 03:16:36 +02:00
Ben Noordhuis
255671da74 include: uv_tcp_connect{6} now takes sockaddr_in*
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.

Fixes #684.
2013-09-01 08:02:15 +02:00
Ben Noordhuis
8184076879 include: uv_ip[46]_addr now takes sockaddr_in*
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.

Fixes #684.
2013-09-01 08:02:07 +02:00
Ben Noordhuis
b7d027c3a8 include: uv_read{2}_cb now takes const uv_buf_t*
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.

Fixes #684.
2013-09-01 08:01:34 +02:00
Ben Noordhuis
3fb6612233 include: uv_alloc_cb now takes uv_buf_t*
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.

Fixes #684.
2013-09-01 07:57:31 +02:00
Ben Noordhuis
3ee4d3f183 unix, windows: return error codes directly
This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.

A code snippet like this one:

    if (uv_foo(loop) < 0) {
      uv_err_t err = uv_last_error(loop);
      fprintf(stderr, "%s\n", uv_strerror(err));
    }

Should be rewritten like this:

    int err = uv_foo(loop);
    if (err < 0)
      fprintf(stderr, "%s\n", uv_strerror(err));

The rationale for this change is that it should make creating bindings
for other languages a lot easier: dealing with struct return values is
painful with most FFIs and often downright buggy.
2013-07-07 09:51:00 +02:00
Ben Noordhuis
4ba03ddd56 unix, windows: rename uv_run2 to uv_run
This changes the prototype of uv_run() from:

  int uv_run(uv_loop_t* loop);

To:

  int uv_run(uv_loop_t* loop, uv_run_mode mode);

Where `mode` is UV_RUN_DEFAULT, UV_RUN_ONCE or UV_RUN_NOWAIT.

Fixes #683.
2013-01-16 23:35:29 +01:00
Bert Belder
47eb03490a test: move loop cleanup code to the individual tests 2012-10-17 01:24:49 +02:00
Ben Noordhuis
59cda86709 unix, test: make NANOSEC a 64 bits unsigned int
Avoids accidental overflow / truncation when it's used in 32 bits arithmetic.
2012-06-07 17:00:01 +02:00
Bert Belder
aafa7db1d4 Test benchmark_pound: fix compilation problem 2012-03-09 16:31:12 +01:00
Ben Noordhuis
d4bfcc28c8 bench: fix compiler warnings 2011-11-11 18:52:34 +01:00
Igor Zinkovsky
faca1402ef make uv_pipe_connect return void 2011-11-04 16:06:53 -07:00
Ryan Dahl
6921d2fc07 Add argument to uv_pipe_init for IPC, unix impl 2011-10-06 10:17:07 -07:00
Bert Belder
0dc564a2aa Remove uv_init calls from tests and benchmarks 2011-09-12 11:32:41 -07:00
Bert Belder
b44ecf9929 multiplicity: update benchmarks 2011-08-31 05:18:48 +02:00
Bert Belder
3aec77f9d4 bring back uv_init 2011-08-31 04:19:07 +02:00
Ryan Dahl
56dcaf9b06 unix: multiplicity 2011-08-31 04:18:55 +02:00
Ben Noordhuis
36ce74f2ca Add UDP support to libuv. 2011-08-24 04:55:01 +02:00
Ryan Dahl
123119342f pound: only display connect errors on DEBUG 2011-08-18 15:31:54 -07:00
Igor Zinkovsky
f6c25a17ea Fix pipe-pound and clean-up 2011-08-18 15:30:34 -07:00
Ryan Dahl
ac1ce29ad0 Improve pound benchmark by reconnecting in close_cb 2011-08-18 15:30:34 -07:00
Ben Noordhuis
d358738954 bench: #undef NANOSEC, defined in time.h on solaris 2011-08-11 23:43:52 +00:00
Ben Noordhuis
3f8bbb8c0f bench: create separate arrays for TCP and pipe streams
Size and alignment of tcp_conn_rec and pipe_conn_rec may differ
so it's not safe to reuse a single array of conn_rec elements.
2011-08-09 20:02:59 +02:00
Ben Noordhuis
65ed582cae bench: run pound benchmark for at least 5 seconds, track connect failures 2011-08-09 03:16:29 +02:00
Ben Noordhuis
cee3cc6940 bench: use high-res timer in pound benchmark 2011-08-09 01:51:25 +02:00
Igor Zinkovsky
f9eda88fe6 fix for pound benchmark 2011-08-08 15:09:14 -07:00
Igor Zinkovsky
a706a66d81 accept benchmark 2011-08-05 18:20:06 -07:00