Index: /trunk/include/cf/bin.h
===================================================================
--- /trunk/include/cf/bin.h	(revision 6)
+++ /trunk/include/cf/bin.h	(revision 7)
@@ -29,8 +29,8 @@
 		 * shallow-copy constructor(default constructor)
 		 * @param in binary
-		 * @param size binary size
+		 * @param length binary size
 		 */
 		bin(const cf::uint8_t * in = NULL,
-			const cf::size_t size = 0);
+			const cf::size_t length = 0);
 
 		/**
@@ -78,8 +78,8 @@
 		 * set 
 		 * @param in data
-		 * @param size size
+		 * @param length size
 		 */
 		cf::void_t set(const cf::uint8_t * in,
-					   const cf::size_t size);
+					   const cf::size_t length);
 
 		/**
@@ -110,8 +110,8 @@
 		 * @return on success, position; otherwise, (cf::size_t)-1
 		 * @param in binary
-		 * @param size binary size
+		 * @param length binary size
 		 */
 		cf::size_t find(const cf::uint8_t * in,
-						const cf::size_t size) const;
+						const cf::size_t length) const;
 
 		/**
Index: /trunk/include/cf/exception.h
===================================================================
--- /trunk/include/cf/exception.h	(revision 6)
+++ /trunk/include/cf/exception.h	(revision 7)
@@ -65,5 +65,5 @@
 		 * destructor derived from std::exception::~exception()
 		 */
-		~exception()
+		virtual ~exception()
 			throw ();
 
Index: /trunk/include/cf/file.h
===================================================================
--- /trunk/include/cf/file.h	(revision 6)
+++ /trunk/include/cf/file.h	(revision 7)
@@ -76,5 +76,5 @@
 		 * destructor
 		 */
-		~file();
+		virtual ~file();
 
 		/**
Index: /trunk/include/cf/logger.h
===================================================================
--- /trunk/include/cf/logger.h	(revision 6)
+++ /trunk/include/cf/logger.h	(revision 7)
@@ -58,5 +58,5 @@
 		 * destructor
 		 */
-		~logger();
+		virtual ~logger();
 
 		/**
@@ -114,5 +114,5 @@
 			DAILY		= 0x00000010,	/**< daily rotation */
 			SIZE		= 0x00000020,	/**< size rotation */
-			SECURE		= 0x00000100	/**< encrypt message */
+			PID			= 0x00000100	/**< process-id in log file name */
 		};
 
Index: /trunk/include/cf/memory.h
===================================================================
--- /trunk/include/cf/memory.h	(revision 6)
+++ /trunk/include/cf/memory.h	(revision 7)
@@ -32,5 +32,5 @@
 		 * destructor. free memory
 		 */
-		~memory();
+		virtual ~memory();
 
 		/**
Index: /trunk/include/cf/network.h
===================================================================
--- /trunk/include/cf/network.h	(revision 6)
+++ /trunk/include/cf/network.h	(revision 7)
@@ -12,4 +12,6 @@
 #include <string>
 
+#define UNUSED_SOCKET	-1
+
 namespace cf
 {
@@ -79,5 +81,5 @@
 			 * @throw cf::exception
 			 */
-			tcp(const cf::socket_t attachedSocket = -1)
+			tcp(const cf::socket_t attachedSocket = UNUSED_SOCKET)
 				throw (cf::exception);
 
@@ -85,5 +87,11 @@
 			 * destructor
 			 */
-			~tcp();
+			virtual ~tcp();
+
+			/**
+			 * get socket descriptor
+			 * @return socket descriptor
+			 */
+			cf::socket_t descriptor() const;
 
 			/**
@@ -178,4 +186,10 @@
 
 			/**
+			 * set non-blocking
+			 * @param flag true; false
+			 */
+			cf::void_t setNonBlocking(const cf::bool_t flag);
+
+			/**
 			 * set timeout
 			 * @param seconds timeout seconds
@@ -215,4 +229,39 @@
 				throw (cf::exception);
 		};
+
+		/**
+		 * byteOrder
+		 */
+		class byteOrder
+		{
+		public:
+			/**
+			 * host to network long
+			 * @return long for network
+			 * @param long for host
+			 */
+			static cf::uint32_t htonl(cf::uint32_t in);
+
+			/**
+			 * host to network short
+			 * @return short for network
+			 * @param short for host
+			 */
+			static cf::uint16_t htons(cf::uint16_t in);
+
+			/**
+			 * network to host long
+			 * @return long for host
+			 * @param long for network
+			 */
+			static cf::uint32_t ntohl(cf::uint32_t in);
+
+			/**
+			 * network to host short
+			 * @return short for host
+			 * @param short for network
+			 */
+			static cf::uint16_t ntohs(cf::uint16_t in);
+		};
 	}
 }
Index: /trunk/include/cf/task.h
===================================================================
--- /trunk/include/cf/task.h	(revision 6)
+++ /trunk/include/cf/task.h	(revision 7)
@@ -63,5 +63,5 @@
 			 * destructor
 			 */
-			~mutex();
+			virtual ~mutex();
 
 			/**
@@ -113,5 +113,5 @@
 			 * destructor for unlocking
 			 */
-			~scopedLock();
+			virtual ~scopedLock();
 
 			/**
@@ -155,5 +155,5 @@
 			 * destructor
 			 */
-			~thread();
+			virtual ~thread();
 
 			/**
Index: /trunk/src/bin.cpp
===================================================================
--- /trunk/src/bin.cpp	(revision 6)
+++ /trunk/src/bin.cpp	(revision 7)
@@ -10,7 +10,7 @@
 
 cf::bin::bin(const cf::uint8_t * in,
-			 const cf::size_t size)
+			 const cf::size_t length)
 {
-	set(in, size);
+	set(in, length);
 }
 
@@ -55,11 +55,11 @@
 
 cf::void_t cf::bin::set(const cf::uint8_t * in,
-						const cf::size_t size)
+						const cf::size_t length)
 {
 	if (!in)
 		return;
 
-	resize(size);
-	memcpy(buffer(), in, size);
+	resize(length);
+	memcpy(buffer(), in, length);
 }
 
@@ -123,20 +123,14 @@
 
 cf::size_t cf::bin::find(const cf::uint8_t * in,
-						 const cf::size_t size) const
+						 const cf::size_t length) const
 {
-	cf::size_t limit = this->size() - size;
+	cf::size_t limit = size() - length;
 
 	if (limit < 0 || !in)
 		return -1;
 
-	for (cf::size_t iter = 0, iterIn = 0 ; iter <= limit ; iter++)
+	for (cf::size_t iter = 0 ; iter <= limit ; iter++)
 	{
-		for (iterIn = 0 ; iterIn < size ; iterIn++)
-		{
-			if (*((buffer() + iter) + iterIn) != *(in + iterIn))
-				break;
-		}
-
-		if (iterIn == size)
+		if (!memcmp(buffer() + iter, in, length))
 			return iter;
 	}
Index: /trunk/src/codec.cpp
===================================================================
--- /trunk/src/codec.cpp	(revision 6)
+++ /trunk/src/codec.cpp	(revision 7)
@@ -21,4 +21,5 @@
 	if (in.empty())
 		THROW_EXCEPTION("input is empty");
+
 	try
 	{
Index: /trunk/src/logger.cpp
===================================================================
--- /trunk/src/logger.cpp	(revision 6)
+++ /trunk/src/logger.cpp	(revision 7)
@@ -49,5 +49,6 @@
 		}
 
-		filepath += STR("." << cf::task::process::id());
+		if (option & cf::logger::PID)
+			filepath += STR("." << cf::task::process::id());
 
 		/* FORCED : append file-extension */
Index: /trunk/src/network.cpp
===================================================================
--- /trunk/src/network.cpp	(revision 6)
+++ /trunk/src/network.cpp	(revision 7)
@@ -39,6 +39,4 @@
 #endif
 
-#define UNUSED_SOCKET	-1
-
 /*--------------------------------------------------------------*/
 /**
@@ -62,20 +60,4 @@
 }
 
-static cf::void_t setNonBlocking(const cf::socket_t sock,
-								 const cf::bool_t flag)
-{
-#ifdef _ON_WINDOWS
-	cf::ulong_t mode = flag ? 1 : 0;
-	ioctlsocket(sock, FIONBIO, &mode);
-#else
-	cf::int32_t mode = fcntl(sock, F_GETFL, 0);
-
-	if (flag)	mode |=  O_NONBLOCK;
-	else		mode &= ~O_NONBLOCK;
-
-	fcntl(sock, F_SETFL, mode);
-#endif
-}
-
 static cf::void_t waitForTimeout(const cf::socket_t sock,
 								 const cf::int32_t timeout,
@@ -206,4 +188,9 @@
 {
 	close();
+}
+
+cf::socket_t cf::network::tcp::descriptor() const
+{
+	return mSocket;
 }
 
@@ -348,6 +335,4 @@
 		THROW_EXCEPTION("has invalid socket");
 
-	close();
-
 	mSocket = sock;
 }
@@ -477,7 +462,22 @@
 }
 
+cf::void_t cf::network::tcp::setNonBlocking(const cf::bool_t flag)
+{
+#ifdef _ON_WINDOWS
+	cf::ulong_t mode = flag ? 1 : 0;
+	ioctlsocket(mSocket, FIONBIO, &mode);
+#else
+	cf::int32_t mode = fcntl(mSocket, F_GETFL, 0);
+
+	if (flag)	mode |=  O_NONBLOCK;
+	else		mode &= ~O_NONBLOCK;
+
+	fcntl(mSocket, F_SETFL, mode);
+#endif
+}
+
 cf::void_t cf::network::tcp::setTimeout(const cf::int32_t seconds)
 {
-	setNonBlocking(mSocket, seconds > 0 /*? true : false*/);
+	setNonBlocking(seconds > 0 /*? true : false*/);
 	mTimeout = seconds;
 }
@@ -535,2 +535,23 @@
 	return std::string(asciiz);
 }
+
+
+cf::uint32_t cf::network::byteOrder::htonl(cf::uint32_t in)
+{
+	return htonl(in);
+}
+
+cf::uint16_t cf::network::byteOrder::htons(cf::uint16_t in)
+{
+	return htons(in);
+}
+
+cf::uint32_t cf::network::byteOrder::ntohl(cf::uint32_t in)
+{
+	return ntohl(in);
+}
+
+cf::uint16_t cf::network::byteOrder::ntohs(cf::uint16_t in)
+{
+	return ntohs(in);
+}
