Sock::Sock

Constructors

Synopses

Declared in <util/sock.h>

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

Sock() = delete;
» more...

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

Sock(Sock const& other) = delete;
» more...

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

Sock(Sock&& other);
» more...

Take ownership of an existent socket.

explicit
Sock(SOCKET s);
» more...

Parameters

NameDescription
otherThe socket wrapper that would be copied.
sThe socket descriptor to take ownership of.