[#Sock-2constructor-07] = xref:Sock.adoc[Sock]::Sock :relfileprefix: ../ :mrdocs: Constructors == Synopses Declared in `<util/sock.h>` Default construction is disabled: a `Sock` always wraps an existing socket. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:Sock/2constructor-03.adoc[Sock]() = delete; ---- [.small]#xref:Sock/2constructor-03.adoc[_» more..._]# Copy constructor, disabled because closing the same socket twice is undesirable. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:Sock/2constructor-08.adoc[Sock](xref:Sock.adoc[Sock] const& other) = delete; ---- [.small]#xref:Sock/2constructor-08.adoc[_» more..._]# Move constructor, grab the socket from another object and close ours (if set). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:Sock/2constructor-02b.adoc[Sock](xref:Sock.adoc[Sock]&& other); ---- [.small]#xref:Sock/2constructor-02b.adoc[_» more..._]# Take ownership of an existent socket. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:Sock/2constructor-029.adoc[Sock](xref:SOCKET.adoc[SOCKET] s); ---- [.small]#xref:Sock/2constructor-029.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *other* | The socket wrapper that would be copied. | *s* | The socket descriptor to take ownership of. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#