bool Socket::open(const SocketSpec& spec, int flags) { if (spec.isLocal()) return openUnix(spec.local, flags); else return openTcp(spec.address.str(), spec.port, flags); }
bool ServerSocket::open(const SocketSpec& spec, int flags) { if (spec.backlog() > 0) setBacklog(spec.backlog()); if (spec.isLocal()) return open(spec.local(), flags); else return open(spec.ipaddr().str(), spec.port(), flags); }