[#CService-SetSockAddr]
= xref:CService.adoc[CService]::SetSockAddr
:relfileprefix: ../
:mrdocs:

Set CService from a network sockaddr&period;

== Synopsis

Declared in `&lt;netaddress&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
SetSockAddr(
    sockaddr const* paddr,
    socklen&lowbar;t addrlen);
----

== Return Value

true on success

== Parameters

[cols="1,4"]
|===
| Name| Description
| *paddr* [in]
| Pointer to sockaddr structure
| *addrlen* [in]
| Length of sockaddr structure in bytes&period; This will be checked to exactly match the length of a socket address of the provided family, unless std&colon;&colon;nullopt is passed
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
