scopedsocket.cpp 275 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include "scopedsocket.h" ScopedSocket::ScopedSocket(int socket) : socket(socket) { } ScopedSocket::ScopedSocket(ScopedSocket &&other) { this->socket = other.socket; other.socket = 0; } ScopedSocket::~ScopedSocket() { if (socket > 0) close(socket); }