#ifndef _MOOF_SOCKET_HH_
#define _MOOF_SOCKET_HH_
-/**
- * \file socket.hh
- * Network-related classes, including a reinterpreted sockets API.
- */
-
#include <algorithm>
#include <cstring>
#include <iostream>
#include <moof/packet.hh>
#include <moof/thread.hh>
-
#ifndef AI_ADDRCONFIG
#define AI_ADDRCONFIG 0
#endif
#endif
+/**
+ * \file socket.hh
+ * Network-related classes, including a reinterpreted sockets API.
+ */
+
namespace moof {
void socket(moof::socket sock)
{
- mutex::scoped_lock lock(mutex_);
+ MOOF_MUTEX_LOCK(mutex_);
socket_ = sock;
}
moof::socket socket_;
std::vector<function> protocols_;
- mutex mutex_;
+
+ MOOF_DECLARE_MUTEX(mutex_);
};