Constructors

Synopses

Declared in <util/sock.h>

Default construction is disabled: a Sock always wraps an existing socket.

Sock() = delete;

Copy constructor, disabled because closing the same socket twice is undesirable.

Sock(Sock const& other) = delete;

Move constructor, grab the socket from another object and close ours (if set).

Sock(Sock&& other);

Take ownership of an existent socket.

explicit
Sock(SOCKET s);

Parameters

Name

Description

other

The socket wrapper that would be copied.

s

The socket descriptor to take ownership of.

Created with MrDocs