Logo white

Peter M. Groen / FlashMQ

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • FlashMQ
  • scopedsocket.cpp
  • Add IPv6 support, with related listener options ...
    d06dcb0b
    This also adds configuration options for choosing what address to bind
    to.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse Code ยป
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);
}