/** @file
* @brief socket classes for the AsyncIo framework.
*
- * (c) Copyright 2008 by Intra2net AG
+ * @copyright Copyright 2008-2009 by Intra2net AG
+ * @contact Intra2net Opensource Team \<opensource@intra2net.com\>
*/
-#ifndef __SIMPLEIO__SIMPLESOCKET_HPP__
-#define __SIMPLEIO__SIMPLESOCKET_HPP__
+#ifndef __ASYNC_SOCKET_HPP__
+#define __ASYNC_SOCKET_HPP__
#include "async_io.hpp"
+#include "asyncio_system_tools.hpp"
#include <string>
#include <boost/any.hpp>
/**
- * @brief spezialized IO class for unix domain sockets.
+ * @brief specialized IO class for unix domain sockets.
*
*/
class UnixIOSocket
friend class UnixServerSocketBase;
friend class UnixServerSocket<UnixIOSocket>;
- UnixIOSocket(
- int fd, const std::string& path,
- unsigned int peer_pid, unsigned int peer_uid, unsigned int peer_gid);
+ UnixIOSocket(int fd, const std::string& path);
+
+ bool update_peer_information(int fd);
protected:
/**
- * @brief spezialized server socket class for unix domain sockets.
+ * @brief specialized server socket class for unix domain sockets.
*
*/
class UnixServerSocketBase
virtual IOImplementationPtr acceptNewConnection(int fd, boost::any addr);
- virtual UnixIOSocketPtr createIOSocket(
- int fd, const std::string& path,
- unsigned int peer_pid,
- unsigned int peer_uid, unsigned int peer_gid);
+ virtual UnixIOSocketPtr createIOSocket(int fd, const std::string& path);
protected:
/**
* @brief unix server socket class which "produces" connections of a determined type.
*
- + @param IOClass the type of the connections.
+ * @param IOClass the type of the connections.
*/
template<
class IOClass
protected:
virtual UnixIOSocketPtr createIOSocket(
- int fd, const std::string& path,
- unsigned int peer_pid,
- unsigned int peer_uid, unsigned int peer_gid)
+ int fd, const std::string& path)
{
return UnixIOSocketPtr(
- new IOClass(fd, path, peer_pid, peer_uid, peer_gid)
+ new IOClass(fd, path)
);
}
}; // eo class UnixServerSocket
-}// eo namespace AsyncIo
+
+}// end of namespace AsyncIo
#endif