From: Amos Jeffries Date: Fri, 26 Nov 2010 09:55:11 +0000 (+1300) Subject: Roll Comm::Connection into new mgr/ code X-Git-Tag: take08~55^2~124^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3e8e4e9e2885cfc152a0c405a641510cde0fa93;p=thirdparty%2Fsquid.git Roll Comm::Connection into new mgr/ code --- diff --git a/src/mgr/ActionWriter.cc b/src/mgr/ActionWriter.cc index de0557568f..739471cadc 100644 --- a/src/mgr/ActionWriter.cc +++ b/src/mgr/ActionWriter.cc @@ -7,17 +7,18 @@ #include "config.h" #include "base/TextException.h" +#include "comm/Connection.h" #include "mgr/ActionWriter.h" #include "Store.h" CBDATA_NAMESPACED_CLASS_INIT(Mgr, ActionWriter); -Mgr::ActionWriter::ActionWriter(const Action::Pointer &anAction, int aFd): - StoreToCommWriter(aFd, anAction->createStoreEntry()), +Mgr::ActionWriter::ActionWriter(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn): + StoreToCommWriter(conn, anAction->createStoreEntry()), action(anAction) { - debugs(16, 5, HERE << "FD " << aFd << " action: " << action); + debugs(16, 5, HERE << conn << " action: " << action); } void diff --git a/src/mgr/ActionWriter.h b/src/mgr/ActionWriter.h index 25a4bd204f..0180c44c85 100644 --- a/src/mgr/ActionWriter.h +++ b/src/mgr/ActionWriter.h @@ -8,6 +8,7 @@ #ifndef SQUID_MGR_ACTION_WRITER_H #define SQUID_MGR_ACTION_WRITER_H +#include "comm/forward.h" #include "HttpRequestMethod.h" #include "mgr/StoreToCommWriter.h" @@ -20,7 +21,7 @@ namespace Mgr class ActionWriter: public StoreToCommWriter { public: - ActionWriter(const Action::Pointer &anAction, int aFd); + ActionWriter(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn); protected: /* AsyncJob API */ diff --git a/src/mgr/Filler.cc b/src/mgr/Filler.cc index a1afd60404..83adae6175 100644 --- a/src/mgr/Filler.cc +++ b/src/mgr/Filler.cc @@ -7,6 +7,7 @@ #include "config.h" #include "base/TextException.h" +#include "comm/Connection.h" #include "mgr/Filler.h" #include "mgr/Response.h" #include "Store.h" @@ -14,13 +15,13 @@ CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler); -Mgr::Filler::Filler(const Action::Pointer &anAction, int aFd, +Mgr::Filler::Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn, unsigned int aRequestId): - StoreToCommWriter(aFd, anAction->createStoreEntry()), + StoreToCommWriter(conn, anAction->createStoreEntry()), action(anAction), requestId(aRequestId) { - debugs(16, 5, HERE << "FD " << aFd << " action: " << action); + debugs(16, 5, HERE << conn << " action: " << action); } void diff --git a/src/mgr/Filler.h b/src/mgr/Filler.h index e6c7ba1f03..1b5a945762 100644 --- a/src/mgr/Filler.h +++ b/src/mgr/Filler.h @@ -8,6 +8,7 @@ #ifndef SQUID_MGR_FILLER_H #define SQUID_MGR_FILLER_H +#include "comm/forward.h" #include "HttpRequestMethod.h" #include "mgr/Action.h" #include "mgr/StoreToCommWriter.h" @@ -19,7 +20,7 @@ namespace Mgr class Filler: public StoreToCommWriter { public: - Filler(const Action::Pointer &anAction, int aFd, unsigned int aRequestId); + Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn, unsigned int aRequestId); protected: /* AsyncJob API */ diff --git a/src/mgr/Forwarder.cc b/src/mgr/Forwarder.cc index 3d518d0212..480122a56b 100644 --- a/src/mgr/Forwarder.cc +++ b/src/mgr/Forwarder.cc @@ -8,6 +8,7 @@ #include "config.h" #include "base/AsyncJobCalls.h" #include "base/TextException.h" +#include "comm/Connection.h" #include "CommCalls.h" #include "errorpage.h" #include "HttpReply.h" @@ -24,14 +25,14 @@ CBDATA_NAMESPACED_CLASS_INIT(Mgr, Forwarder); Mgr::Forwarder::RequestsMap Mgr::Forwarder::TheRequestsMap; unsigned int Mgr::Forwarder::LastRequestId = 0; -Mgr::Forwarder::Forwarder(int aFd, const ActionParams &aParams, +Mgr::Forwarder::Forwarder(const Comm::ConnectionPointer &conn, const ActionParams &aParams, HttpRequest* aRequest, StoreEntry* anEntry): AsyncJob("Mgr::Forwarder"), params(aParams), - request(aRequest), entry(anEntry), fd(aFd), requestId(0), closer(NULL) + request(aRequest), entry(anEntry), clientConnection(conn), requestId(0), closer(NULL) { - debugs(16, 5, HERE << "FD " << aFd); - Must(fd >= 0); + debugs(16, 5, HERE << clientConnection); + Must(Comm::IsConnOpen(clientConnection)); Must(request != NULL); Must(entry != NULL); @@ -41,7 +42,7 @@ Mgr::Forwarder::Forwarder(int aFd, const ActionParams &aParams, closer = asyncCall(16, 5, "Mgr::Forwarder::noteCommClosed", CommCbMemFunT(this, &Forwarder::noteCommClosed)); - comm_add_close_handler(fd, closer); + comm_add_close_handler(clientConnection->fd, closer); } Mgr::Forwarder::~Forwarder() @@ -61,13 +62,12 @@ Mgr::Forwarder::~Forwarder() void Mgr::Forwarder::close() { - if (fd >= 0) { + if (Comm::IsConnOpen(clientConnection)) { if (closer != NULL) { - comm_remove_close_handler(fd, closer); + comm_remove_close_handler(clientConnection->fd, closer); closer = NULL; } - comm_close(fd); - fd = -1; + clientConnection->close(); } } @@ -84,7 +84,7 @@ Mgr::Forwarder::start() ++LastRequestId; requestId = LastRequestId; TheRequestsMap[requestId] = callback; - Request mgrRequest(KidIdentifier, requestId, fd, params); + Request mgrRequest(KidIdentifier, requestId, clientConnection, params); Ipc::TypedMsgHdr message; try { @@ -126,8 +126,7 @@ void Mgr::Forwarder::noteCommClosed(const CommCloseCbParams& params) { debugs(16, 5, HERE); - Must(fd == params.fd); - fd = -1; + Must(!Comm::IsConnOpen(clientConnection)); mustStop("commClosed"); } @@ -187,7 +186,7 @@ void Mgr::Forwarder::callException(const std::exception& e) { try { - if (entry != NULL && request != NULL && fd >= 0) + if (entry != NULL && request != NULL && Comm::IsConnOpen(clientConnection)) quitOnError("exception", errorCon(ERR_INVALID_RESP, HTTP_INTERNAL_SERVER_ERROR, request)); } catch (const std::exception& ex) { debugs(16, DBG_CRITICAL, HERE << ex.what()); @@ -235,6 +234,6 @@ void Mgr::Forwarder::Abort(void* param) { Forwarder* mgrFwdr = static_cast(param); - if (mgrFwdr->fd >= 0) - comm_close(mgrFwdr->fd); + if (Comm::IsConnOpen(mgrFwdr->clientConnection)) + mgrFwdr->clientConnection->close(); } diff --git a/src/mgr/Forwarder.h b/src/mgr/Forwarder.h index 470a1a3fc7..f3cf15d87d 100644 --- a/src/mgr/Forwarder.h +++ b/src/mgr/Forwarder.h @@ -9,6 +9,7 @@ #define SQUID_MGR_FORWARDER_H #include "base/AsyncJob.h" +#include "comm/forward.h" #include "mgr/ActionParams.h" #include @@ -28,7 +29,7 @@ namespace Mgr class Forwarder: public AsyncJob { public: - Forwarder(int aFd, const ActionParams &aParams, HttpRequest* aRequest, + Forwarder(const Comm::ConnectionPointer &conn, const ActionParams &aParams, HttpRequest* aRequest, StoreEntry* anEntry); virtual ~Forwarder(); @@ -59,7 +60,7 @@ private: ActionParams params; ///< action parameters to pass to the other side HttpRequest* request; ///< HTTP client request for detailing errors StoreEntry* entry; ///< Store entry expecting the response - int fd; ///< HTTP client connection descriptor + Comm::ConnectionPointer clientConnection; ///< HTTP client connection descriptor unsigned int requestId; ///< request id AsyncCall::Pointer closer; ///< comm_close handler for the HTTP connection diff --git a/src/mgr/FunAction.cc b/src/mgr/FunAction.cc index 4e7bc49270..05d1129ca3 100644 --- a/src/mgr/FunAction.cc +++ b/src/mgr/FunAction.cc @@ -7,6 +7,7 @@ #include "config.h" #include "base/TextException.h" +#include "comm/Connection.h" #include "mgr/Command.h" #include "mgr/Filler.h" #include "mgr/FunAction.h" @@ -31,10 +32,10 @@ void Mgr::FunAction::respond(const Request& request) { debugs(16, 5, HERE); - const int fd = ImportHttpFdIntoComm(request.fd); - Must(fd >= 0); + const Comm::ConnectionPointer client = ImportHttpFdIntoComm(request.fd); + Must(Comm::IsConnOpen(client)); Must(request.requestId != 0); - AsyncJob::Start(new Mgr::Filler(this, fd, request.requestId)); + AsyncJob::Start(new Mgr::Filler(this, client, request.requestId)); } void diff --git a/src/mgr/InfoAction.cc b/src/mgr/InfoAction.cc index 27adf22ec8..17ec7590cc 100644 --- a/src/mgr/InfoAction.cc +++ b/src/mgr/InfoAction.cc @@ -7,6 +7,7 @@ #include "config.h" #include "base/TextException.h" +#include "comm/Connection.h" #include "HttpReply.h" #include "ipc/Messages.h" #include "ipc/TypedMsgHdr.h" @@ -155,10 +156,10 @@ void Mgr::InfoAction::respond(const Request& request) { debugs(16, 5, HERE); - int fd = ImportHttpFdIntoComm(request.fd); - Must(fd >= 0); + Comm::ConnectionPointer client = ImportHttpFdIntoComm(request.fd); + Must(Comm::IsConnOpen(client)); Must(request.requestId != 0); - AsyncJob::Start(new Mgr::Filler(this, fd, request.requestId)); + AsyncJob::Start(new Mgr::Filler(this, client, request.requestId)); } void diff --git a/src/mgr/Inquirer.cc b/src/mgr/Inquirer.cc index 3f9dc27e5e..5da18137ed 100644 --- a/src/mgr/Inquirer.cc +++ b/src/mgr/Inquirer.cc @@ -7,7 +7,9 @@ #include "config.h" #include "base/TextException.h" +#include "comm.h" #include "CommCalls.h" +#include "comm/Connection.h" #include "HttpReply.h" #include "ipc/Coordinator.h" #include "mgr/ActionWriter.h" @@ -32,23 +34,23 @@ LesserStrandByKidId(const Ipc::StrandCoord &c1, const Ipc::StrandCoord &c2) return c1.kidId < c2.kidId; } -Mgr::Inquirer::Inquirer(Action::Pointer anAction, int aFd, +Mgr::Inquirer::Inquirer(Action::Pointer anAction, const Comm::ConnectionPointer &conn, const Request &aCause, const Ipc::StrandCoords &coords): AsyncJob("Mgr::Inquirer"), aggrAction(anAction), cause(aCause), - fd(aFd), + clientConnection(conn), strands(coords), pos(strands.begin()), requestId(0), closer(NULL), timeout(aggrAction->atomic() ? 10 : 100) { - debugs(16, 5, HERE << "FD " << aFd << " action: " << aggrAction); + debugs(16, 5, HERE << conn << " action: " << aggrAction); // order by ascending kid IDs; useful for non-aggregatable stats std::sort(strands.begin(), strands.end(), LesserStrandByKidId); closer = asyncCall(16, 5, "Mgr::Inquirer::noteCommClosed", CommCbMemFunT(this, &Inquirer::noteCommClosed)); - comm_add_close_handler(fd, closer); + comm_add_close_handler(clientConnection->fd, closer); } Mgr::Inquirer::~Inquirer() @@ -61,10 +63,9 @@ Mgr::Inquirer::~Inquirer() void Mgr::Inquirer::close() { - if (fd >= 0) { + if (Comm::IsConnOpen(clientConnection)) { removeCloseHandler(); - comm_close(fd); - fd = -1; + clientConnection->close(); } } @@ -72,7 +73,7 @@ void Mgr::Inquirer::removeCloseHandler() { if (closer != NULL) { - comm_remove_close_handler(fd, closer); + comm_remove_close_handler(clientConnection->fd, closer); closer = NULL; } } @@ -81,7 +82,7 @@ void Mgr::Inquirer::start() { debugs(16, 5, HERE); - Must(fd >= 0); + Must(Comm::IsConnOpen(clientConnection)); Must(aggrAction != NULL); std::auto_ptr reply(new HttpReply); @@ -90,7 +91,7 @@ Mgr::Inquirer::start() std::auto_ptr replyBuf(reply->pack()); writer = asyncCall(16, 5, "Mgr::Inquirer::noteWroteHeader", CommCbMemFunT(this, &Inquirer::noteWroteHeader)); - comm_write_mbuf(fd, replyBuf.get(), writer); + comm_write_mbuf(clientConnection, replyBuf.get(), writer); } /// called when we wrote the response header @@ -100,7 +101,7 @@ Mgr::Inquirer::noteWroteHeader(const CommIoCbParams& params) debugs(16, 5, HERE); writer = NULL; Must(params.flag == COMM_OK); - Must(params.fd == fd); + Must(clientConnection != NULL && params.fd == clientConnection->fd); Must(params.size != 0); // start inquiries at the initial pos inquire(); @@ -123,7 +124,7 @@ Mgr::Inquirer::inquire() const int kidId = pos->kidId; debugs(16, 4, HERE << "inquire kid: " << kidId << status()); TheRequestsMap[requestId] = callback; - Request mgrRequest(KidIdentifier, requestId, fd, + Request mgrRequest(KidIdentifier, requestId, clientConnection, aggrAction->command().params); Ipc::TypedMsgHdr message; mgrRequest.pack(message); @@ -151,8 +152,8 @@ void Mgr::Inquirer::noteCommClosed(const CommCloseCbParams& params) { debugs(16, 5, HERE); - Must(fd < 0 || fd == params.fd); - fd = -1; + Must(!Comm::IsConnOpen(clientConnection) || clientConnection->fd == params.fd); + clientConnection = NULL; // AYJ: Do we actually have to NULL it? mustStop("commClosed"); } @@ -167,8 +168,8 @@ Mgr::Inquirer::swanSong() } if (aggrAction->aggregatable()) { removeCloseHandler(); - AsyncJob::Start(new ActionWriter(aggrAction, fd)); - fd = -1; // should not close fd because we passed it to ActionWriter + AsyncJob::Start(new ActionWriter(aggrAction, clientConnection)); + clientConnection = NULL; // should not close fd because we passed it to ActionWriter } close(); } @@ -246,7 +247,7 @@ Mgr::Inquirer::status() const { static MemBuf buf; buf.reset(); - buf.Printf(" [FD %d, requestId %u]", fd, requestId); + buf.Printf(" [FD %d, requestId %u]", clientConnection->fd, requestId); buf.terminate(); return buf.content(); } diff --git a/src/mgr/Inquirer.h b/src/mgr/Inquirer.h index 7059daa2b3..8108713327 100644 --- a/src/mgr/Inquirer.h +++ b/src/mgr/Inquirer.h @@ -10,6 +10,7 @@ #include "base/AsyncJobCalls.h" #include "base/AsyncJob.h" +#include "comm/forward.h" #include "ipc/StrandCoords.h" #include "MemBuf.h" #include "mgr/Action.h" @@ -27,7 +28,7 @@ namespace Mgr class Inquirer: public AsyncJob { public: - Inquirer(Action::Pointer anAction, int aFd, const Request &aCause, + Inquirer(Action::Pointer anAction, const Comm::ConnectionPointer &conn, const Request &aCause, const Ipc::StrandCoords &coords); virtual ~Inquirer(); @@ -63,7 +64,7 @@ private: Action::Pointer aggrAction; //< action to aggregate Request cause; ///< cache manager request received from HTTP client - int fd; ///< HTTP client socket descriptor + Comm::ConnectionPointer clientConnection; ///< HTTP client socket descriptor Ipc::StrandCoords strands; ///< all strands we want to query, in order Ipc::StrandCoords::const_iterator pos; ///< strand we should query now diff --git a/src/mgr/Request.cc b/src/mgr/Request.cc index a0f4014cdd..045ea9b45a 100644 --- a/src/mgr/Request.cc +++ b/src/mgr/Request.cc @@ -7,15 +7,17 @@ #include "config.h" #include "base/TextException.h" +#include "comm/Connection.h" #include "ipc/Messages.h" #include "mgr/ActionParams.h" #include "mgr/Request.h" -Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, int aFd, +Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, const Comm::ConnectionPointer &conn, const ActionParams &aParams): requestorId(aRequestorId), requestId(aRequestId), - fd(aFd), params(aParams) + fd(conn->fd), + params(aParams) { Must(requestorId > 0); Must(requestId != 0); diff --git a/src/mgr/Request.h b/src/mgr/Request.h index 89924f6837..e85f37dcab 100644 --- a/src/mgr/Request.h +++ b/src/mgr/Request.h @@ -19,7 +19,7 @@ namespace Mgr class Request { public: - Request(int aRequestorId, unsigned int aRequestId, int aFd, + Request(int aRequestorId, unsigned int aRequestId, const Comm::ConnectionPointer &conn, const ActionParams &aParams); explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg() diff --git a/src/mgr/StoreToCommWriter.cc b/src/mgr/StoreToCommWriter.cc index 6eb3d22d75..b18f54eadc 100644 --- a/src/mgr/StoreToCommWriter.cc +++ b/src/mgr/StoreToCommWriter.cc @@ -7,6 +7,7 @@ #include "config.h" #include "base/TextException.h" +#include "comm/Connection.h" #include "CommCalls.h" #include "ipc/FdNotes.h" #include "mgr/StoreToCommWriter.h" @@ -17,14 +18,14 @@ CBDATA_NAMESPACED_CLASS_INIT(Mgr, StoreToCommWriter); -Mgr::StoreToCommWriter::StoreToCommWriter(int aFd, StoreEntry* anEntry): +Mgr::StoreToCommWriter::StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry* anEntry): AsyncJob("Mgr::StoreToCommWriter"), - fd(aFd), entry(anEntry), sc(NULL), writeOffset(0), closer(NULL) + clientConnection(conn), entry(anEntry), sc(NULL), writeOffset(0), closer(NULL) { - debugs(16, 6, HERE << "FD " << fd); + debugs(16, 6, HERE << clientConnection); closer = asyncCall(16, 5, "Mgr::StoreToCommWriter::noteCommClosed", CommCbMemFunT(this, &StoreToCommWriter::noteCommClosed)); - comm_add_close_handler(fd, closer); + comm_add_close_handler(clientConnection->fd, closer); } Mgr::StoreToCommWriter::~StoreToCommWriter() @@ -39,13 +40,12 @@ Mgr::StoreToCommWriter::~StoreToCommWriter() void Mgr::StoreToCommWriter::close() { - if (fd >= 0) { + if (Comm::IsConnOpen(clientConnection)) { if (closer != NULL) { - comm_remove_close_handler(fd, closer); + comm_remove_close_handler(clientConnection->fd, closer); closer = NULL; } - comm_close(fd); - fd = -1; + clientConnection->close(); } } @@ -53,7 +53,7 @@ void Mgr::StoreToCommWriter::start() { debugs(16, 6, HERE); - Must(fd >= 0); + Must(Comm::IsConnOpen(clientConnection)); Must(entry != NULL); entry->registerAbort(&StoreToCommWriter::Abort, this); sc = storeClientListAdd(entry, this); @@ -101,14 +101,14 @@ void Mgr::StoreToCommWriter::scheduleCommWrite(const StoreIOBuffer& ioBuf) { debugs(16, 6, HERE); - Must(fd >= 0); + Must(Comm::IsConnOpen(clientConnection)); Must(ioBuf.data != NULL); // write filled buffer typedef CommCbMemFunT MyDialer; AsyncCall::Pointer writer = asyncCall(16, 5, "Mgr::StoreToCommWriter::noteCommWrote", MyDialer(this, &StoreToCommWriter::noteCommWrote)); - comm_write(fd, ioBuf.data, ioBuf.length, writer); + comm_write(clientConnection, ioBuf.data, ioBuf.length, writer); } void @@ -116,7 +116,7 @@ Mgr::StoreToCommWriter::noteCommWrote(const CommIoCbParams& params) { debugs(16, 6, HERE); Must(params.flag == COMM_OK); - Must(params.fd == fd); + Must(clientConnection != NULL && params.fd == clientConnection->fd); Must(params.size != 0); writeOffset += params.size; if (!doneAll()) @@ -127,8 +127,7 @@ void Mgr::StoreToCommWriter::noteCommClosed(const CommCloseCbParams& params) { debugs(16, 6, HERE); - Must(fd == params.fd); - fd = -1; + Must(!Comm::IsConnOpen(clientConnection)); mustStop("commClosed"); } @@ -160,28 +159,29 @@ void Mgr::StoreToCommWriter::Abort(void* param) { StoreToCommWriter* mgrWriter = static_cast(param); - if (mgrWriter->fd >= 0) - comm_close(mgrWriter->fd); + if (Comm::IsConnOpen(mgrWriter->clientConnection)) + mgrWriter->clientConnection->close(); } - -int +Comm::ConnectionPointer Mgr::ImportHttpFdIntoComm(int fd) { + Comm::ConnectionPointer result = new Comm::Connection(); struct sockaddr_in addr; socklen_t len = sizeof(addr); if (getsockname(fd, reinterpret_cast(&addr), &len) == 0) { - Ip::Address ipAddr(addr); + result->fd = fd; + result->local = addr; struct addrinfo* addr_info = NULL; - ipAddr.GetAddrInfo(addr_info); + result->local.GetAddrInfo(addr_info); addr_info->ai_socktype = SOCK_STREAM; addr_info->ai_protocol = IPPROTO_TCP; - comm_import_opened(fd, ipAddr, COMM_NONBLOCKING, Ipc::FdNote(Ipc::fdnHttpSocket), addr_info); - ipAddr.FreeAddrInfo(addr_info); + comm_import_opened(result, Ipc::FdNote(Ipc::fdnHttpSocket), addr_info); + result->local.FreeAddrInfo(addr_info); } else { debugs(16, DBG_CRITICAL, HERE << "ERROR: FD " << fd << ' ' << xstrerror()); ::close(fd); fd = -1; } - return fd; + return result; } diff --git a/src/mgr/StoreToCommWriter.h b/src/mgr/StoreToCommWriter.h index 116ffdba51..9369f4cbed 100644 --- a/src/mgr/StoreToCommWriter.h +++ b/src/mgr/StoreToCommWriter.h @@ -9,6 +9,7 @@ #define SQUID_MGR_STORE_TO_COMM_WRITER_H #include "base/AsyncJob.h" +#include "comm/forward.h" #include "mgr/Action.h" #include "StoreIOBuffer.h" @@ -25,7 +26,7 @@ namespace Mgr class StoreToCommWriter: public AsyncJob { public: - StoreToCommWriter(int aFd, StoreEntry *anEntry); + StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry *anEntry); virtual ~StoreToCommWriter(); protected: @@ -53,7 +54,7 @@ protected: void close(); protected: - int fd; ///< HTTP client descriptor + Comm::ConnectionPointer clientConnection; ///< HTTP client descriptor StoreEntry* entry; ///< store entry with the cache manager response store_client* sc; ///< our registration with the store @@ -66,7 +67,7 @@ protected: }; /// import HTTP socket fd from another strand into our Comm state -extern int ImportHttpFdIntoComm(int fd); +extern Comm::ConnectionPointer ImportHttpFdIntoComm(int fd); } // namespace Mgr