From 83b82f900faa0c1ecb1adb9fcfe31936ce51fa41 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 27 Jul 2011 04:13:49 +0200 Subject: [PATCH] wrap: upgrade pipe_wrap and tcp_wrap to new libuv API --- src/pipe_wrap.cc | 4 ++-- src/tcp_wrap.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 605ea78d4c..eb7069050f 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -111,7 +111,7 @@ class PipeWrap : StreamWrap { int backlog = args[0]->Int32Value(); - int r = uv_pipe_listen(&wrap->handle_, OnConnection); + int r = uv_listen((uv_stream_t*)&wrap->handle_, backlog, OnConnection); // Error starting the pipe. if (r) SetErrno(uv_last_error().code); @@ -120,7 +120,7 @@ class PipeWrap : StreamWrap { } // TODO maybe share with TCPWrap? - static void OnConnection(uv_handle_t* handle, int status) { + static void OnConnection(uv_stream_t* handle, int status) { HandleScope scope; PipeWrap* wrap = static_cast(handle->data); diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 328b835b88..7ac5d86d35 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -196,7 +196,7 @@ class TCPWrap : public StreamWrap { int backlog = args[0]->Int32Value(); - int r = uv_tcp_listen(&wrap->handle_, backlog, OnConnection); + int r = uv_listen((uv_stream_t*)&wrap->handle_, backlog, OnConnection); // Error starting the tcp. if (r) SetErrno(uv_last_error().code); @@ -204,7 +204,7 @@ class TCPWrap : public StreamWrap { return scope.Close(Integer::New(r)); } - static void OnConnection(uv_handle_t* handle, int status) { + static void OnConnection(uv_stream_t* handle, int status) { HandleScope scope; TCPWrap* wrap = static_cast(handle->data);