]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/comm/UdpOpenDialer.h
1 #ifndef SQUID_COMM_UDPOPENDIALER_H
2 #define SQUID_COMM_UDPOPENDIALER_H
4 #include "ipc/StartListening.h"
9 /// dials a UDP port-opened call
10 class UdpOpenDialer
: public CallDialer
,
11 public Ipc::StartListeningCb
14 typedef void (*Handler
)(const Comm::ConnectionPointer
&conn
, int errNo
);
15 UdpOpenDialer(Handler aHandler
): handler(aHandler
) {}
17 virtual void print(std::ostream
&os
) const { startPrint(os
) << ')'; }
18 virtual bool canDial(AsyncCall
&) const { return true; }
19 virtual void dial(AsyncCall
&) { (handler
)(conn
, errNo
); }
27 #endif /* SQUID_COMM_UDPOPENDIALER_H */