* \param type The type of socket; either SOCK_STREAM or SOCK_DGRAM.
* \param family The family; can be AF_INET or AF_INET6.
*/
- SocketAddress(const std::string& service,
- int type = SOCK_STREAM,
- int family = AF_UNSPEC)
+ explicit SocketAddress(const std::string& service,
+ int type = SOCK_STREAM,
+ int family = AF_UNSPEC)
{
init(service, type, family);
}
* \param family The family; can be AF_INET or AF_INET6.
* \param flags The socket options.
*/
- Socket(const std::string& service,
- int type = SOCK_STREAM,
- int family = AF_UNSPEC,
- int flags = 0) :
+ explicit Socket(const std::string& service,
+ int type = SOCK_STREAM,
+ int family = AF_UNSPEC,
+ int flags = 0) :
mImpl(SocketAddress(service, type, family), flags) {}
Packet&,
const SocketAddress&)> Function;
- SocketMultiplexer(Socket sock) :
+ explicit SocketMultiplexer(Socket sock) :
mSocket(sock) {}