void Server::connect(SocksClientSocket &me, const IPSockAddress &peer) { open(me, me); Message request(socksConnect, peer.address(), peer.port()); request.send(me); Message reply(me); me.mLocalAddress = reply.address(); me.mPeerAddress = peer; secdebug("socks", "%d socks connected to %s", me.fd(), string(peer).c_str()); }
// // Message properties // Message::Message(Command cmd, const IPSockAddress &address) : version(4), message(cmd), port(htons(address.port())), addr(address.address()) { }
IPSockAddress IPSockAddress::defaults(const IPSockAddress &defaultAddr) const { return defaults(defaultAddr.address(), defaultAddr.port()); }