[#CService-2constructor-045] = xref:CService.adoc[CService]::CService :relfileprefix: ../ :mrdocs: Constructors == Synopses Declared in `<netaddress.h>` Construct an unspecified, invalid service. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CService/2constructor-06.adoc[CService](); ---- [.small]#xref:CService/2constructor-06.adoc[_» more..._]# Construct a service from an IPv4 socket address. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:CService/2constructor-041.adoc[CService](sockaddr_in const& addr); ---- [.small]#xref:CService/2constructor-041.adoc[_» more..._]# Construct a service from an IPv6 socket address. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:CService/2constructor-0d.adoc[CService](sockaddr_in6 const& addr); ---- [.small]#xref:CService/2constructor-0d.adoc[_» more..._]# Construct a service from a network address and port. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CService/2constructor-0a.adoc[CService]( xref:CNetAddr.adoc[CNetAddr] const& ip, uint16_t port); ---- [.small]#xref:CService/2constructor-0a.adoc[_» more..._]# Construct a service from an IPv6 address and port. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CService/2constructor-0f.adoc[CService]( in6_addr const& ipv6Addr, uint16_t port); ---- [.small]#xref:CService/2constructor-0f.adoc[_» more..._]# Construct a service from an IPv4 address and port. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CService/2constructor-0e.adoc[CService]( in_addr const& ipv4Addr, uint16_t port); ---- [.small]#xref:CService/2constructor-0e.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *addr* | The IPv4 socket address to read the address and port from. | *ip* | The network address of the service. | *port* | The TCP port in host byte order. | *ipv6Addr* | The IPv6 address of the service. | *ipv4Addr* | The IPv4 address of the service. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#