# # patch "netxx_pipe.cc" # from [b4898ef8c28d02bd140a563ec2611f1330a40334] # to [b17ca135b4a0b719e78a51e75c8fddca24efddd7] # # patch "netxx_pipe.hh" # from [58043f96e71692d0db022a0b8318211c079f6e53] # to [da5c07b8728ee74c0d91457d0bdafe9fd54dbd02] # ======================================================================== --- netxx_pipe.cc b4898ef8c28d02bd140a563ec2611f1330a40334 +++ netxx_pipe.cc b17ca135b4a0b719e78a51e75c8fddca24efddd7 @@ -57,6 +57,7 @@ #include #include #include +#include #endif Netxx::PipeStream::PipeStream (const std::string &cmd, const std::vector &args) @@ -237,14 +238,22 @@ } void Netxx::PipeCompatibleProbe::add(const StreamBase &sb, ready_type rt) -{ try +{ // L(F("PCP::add()\n")); + try { add(const_cast(dynamic_cast(sb)),rt); + // L(F("... was a pipe\n")); } catch (...) { assert(!is_pipe); Probe::add(sb,rt); + // L(F("... was a socket\n")); } } + +void Netxx::PipeCompatibleProbe::add(const StreamServer &ss, ready_type rt) +{ assert(!ip_pipe); + Probe::add(ss,rt); +} #endif #ifdef BUILD_UNIT_TESTS ======================================================================== --- netxx_pipe.hh 58043f96e71692d0db022a0b8318211c079f6e53 +++ netxx_pipe.hh da5c07b8728ee74c0d91457d0bdafe9fd54dbd02 @@ -36,6 +36,7 @@ namespace Netxx { #ifdef WIN32 class PipeCompatibleProbe; +class StreamServer; #endif class PipeStream : public StreamBase @@ -76,6 +77,7 @@ result_type ready(const Timeout &timeout=Timeout(), ready_type rt=ready_none); void add(PipeStream &ps, ready_type rt=ready_none); void add(const StreamBase &sb, ready_type rt=ready_none); + void add(const StreamServer &ss, ready_type rt=ready_none); void remove(const PipeStream &ps); #if 0 // should be covered by StreamBase template void add (const T &t, ready_type rt=ready_none)