stream_wrap: add handle type checkers
authorBen Noordhuis <info@bnoordhuis.nl>
Wed, 7 Aug 2013 15:21:25 +0000 (17:21 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Wed, 7 Aug 2013 15:27:35 +0000 (17:27 +0200)
commit54a9ec4ef09f51c0903af515aa2404922d9f73f0
treee5b92e40861f4470aa4eee38c76bc54384f96504
parentda5ad92ab221e45648c871cf488e0699b5708288
stream_wrap: add handle type checkers

Add is_named_pipe(), is_named_pipe_ipc() and is_tcp() and update the
code base to use those rather than `stream->type == UV_FOO` and
`reinterpret_cast<uv_pipe_t*>(handle)->ipc` style checks.
src/stream_wrap.cc
src/stream_wrap.h
src/tls_wrap.cc