Index: trunk/include/CRXHttpMessage.h
===================================================================
--- trunk/include/CRXHttpMessage.h	(revision 5)
+++ trunk/include/CRXHttpMessage.h	(revision 5)
@@ -0,0 +1,31 @@
+/**
+ * CRXHttpMessage.h
+ */
+#ifndef __CRXHTTPMESSAGE_H__
+#define __CRXHTTPMESSAGE_H__
+
+#include <string>
+
+using namespace std;
+
+class CRXHttpMessage
+{
+protected:
+	std::string	mHttpMessage;
+	std::string	mHttpVersion;
+
+public:
+	CRXHttpMessage				(void);
+
+protected:
+	virtual void	Parse		(void);
+
+public:
+	void			SetMessage	(const char * aHttpMessage);
+	std::string		GetMessage	(void) const;
+
+								operator const char *	(void) const;
+	virtual CRXHttpMessage &	operator =				(const char * aHttpMessage);
+};
+
+#endif // #ifndef __CRXHTTPMESSAGE_H__
Index: trunk/include/CRXHttpRequest.h
===================================================================
--- trunk/include/CRXHttpRequest.h	(revision 5)
+++ trunk/include/CRXHttpRequest.h	(revision 5)
@@ -0,0 +1,38 @@
+/**
+ * CRXHttpRequest.h
+ */
+#ifndef __CRXHTTPREQUEST_H__
+#define __CRXHTTPREQUEST_H__
+
+#include "CRXHttpMessage.h"
+
+class CRXHttpRequest : public CRXHttpMessage
+{
+private:
+	std::string	mMethod;
+	std::string	mUrl;
+	std::string	mHttpVersion;
+
+	std::string	mProtocol;
+	std::string	mHost;
+	int			mPort;
+
+public:
+	CRXHttpRequest					(void);
+
+private:
+	void				Parse		(void);
+
+public:
+	void				SetRequest	(const char * aHttpRequest);
+	std::string			GetRequest	(void) const;
+
+	CRXHttpRequest &	operator =	(const char * aHttpRequest);
+
+public:
+	std::string			GetURL		(void) const;
+	std::string			GetHost		(void) const;
+	int					GetPort		(void) const;
+};
+
+#endif // #ifndef __CRXHTTPREQUEST_H__
Index: trunk/include/CRXHttpResponse.h
===================================================================
--- trunk/include/CRXHttpResponse.h	(revision 5)
+++ trunk/include/CRXHttpResponse.h	(revision 5)
@@ -0,0 +1,31 @@
+/**
+ * CRXHttpResponse.h
+ */
+#ifndef __CRXHTTPRESPONSE_H__
+#define __CRXHTTPRESPONSE_H__
+
+#include "CRXHttpMessage.h"
+
+class CRXHttpResponse : public CRXHttpMessage
+{
+private:
+	int			mStatusCode;
+	std::string	mStatusString;
+
+public:
+	CRXHttpResponse					(void);
+
+private:
+	void				Parse		(void);
+
+public:
+	void				SetResponse	(const char * aHttpResponse);
+	std::string			GetResponse	(void) const;
+
+	CRXHttpResponse &	operator =	(const char * aHttpResponse);
+
+public:
+	int					GetStatusCode (void) const;
+};
+
+#endif // #ifndef __CRXHTTPRESPONSE_H__
Index: trunk/include/CRXSocket.h
===================================================================
--- trunk/include/CRXSocket.h	(revision 5)
+++ trunk/include/CRXSocket.h	(revision 5)
@@ -0,0 +1,115 @@
+/**
+ * CRXSocket.h
+ */
+#ifndef __CRXSOCKET_H__
+#define __CRXSOCKET_H__
+
+#ifdef WIN32
+# include <WinSock2.h>
+#else
+# include <netinet/in.h>
+# include <sys/socket.h>
+# include <arpa/inet.h>
+# include <netdb.h>
+#endif
+
+#include <string>
+
+using namespace std;
+
+typedef struct sockaddr		stSockAddr;
+typedef struct sockaddr_in	stSockAddrIn;
+typedef unsigned short		ushort;
+typedef unsigned int		uint;
+
+#define ERROR_TCPSOCKET							-1000
+
+#define ERROR_TCPSOCKET_FAILED_TO_INITIALIZE	ERROR_TCPSOCKET - 1
+#define ERROR_TCPSOCKET_ALREADY_IN_USE			ERROR_TCPSOCKET - 2
+#define ERROR_TCPSOCKET_FAILED_TO_CREATE_SOCKET	ERROR_TCPSOCKET - 3
+#define ERROR_TCPSOCKET_FAILED_TO_GET_HOSTNAME	ERROR_TCPSOCKET - 4
+#define ERROR_TCPSOCKET_FAILED_TO_CONNECT		ERROR_TCPSOCKET - 5
+#define ERROR_TCPSOCKET_FAILED_TO_BIND			ERROR_TCPSOCKET - 6
+#define ERROR_TCPSOCKET_FAILED_TO_LISTEN		ERROR_TCPSOCKET - 7
+#define ERROR_TCPSOCKET_FAILED_TO_ACCEPT		ERROR_TCPSOCKET - 8
+#define ERROR_TCPSOCKET_FAILED_TO_SEND			ERROR_TCPSOCKET - 9
+#define ERROR_TCPSOCKET_FAILED_TO_RECEIVE		ERROR_TCPSOCKET - 10
+#define ERROR_TCPSOCKET_NOT_READY				ERROR_TCPSOCKET - 11
+
+class CRXSocket
+{
+private:
+	static bool		mInitialized;
+	stSockAddrIn	mAddress;
+	int				mSocket;
+
+private:
+	/**
+	 * create socket.
+	 * @return success : socket id, failed : -1.
+	 */
+	int			CreateSocket	(void);
+
+	/**
+	 * check socket status.
+	 * @return available : true, else : false.
+	 */
+	inline bool	IsCreated		(void) const;
+
+	inline bool	IsReady			(void) const;
+
+	/**
+	 * static functions
+	 */
+	static int	Initialize		(void);
+
+	static bool	IsInitialized	(void);
+
+	static void	Finalize		(void);
+
+
+public:
+	/**
+	 * common functions
+	 */
+	CRXSocket					(int aSocket = 0);
+
+	~CRXSocket					(void);
+
+	void		Attach			(int aSocket);
+
+	int			Detach			(void);
+
+	void		Close			(void);
+
+				operator int	(void) const;
+
+	CRXSocket	& operator =	(int aSocket);
+
+	/**
+	 * for server
+	 */
+	int CreateServer			(ushort			aPort,
+								 int			aBacklog = 5,
+								 stSockAddrIn	* aAddress = NULL);
+
+	int Accept					(stSockAddrIn	* aRemoteAddress = NULL,
+								 int			* aAddressLength = NULL);
+
+	/**
+	 * for client
+	 */
+	int Connect					(std::string	aUrl,
+								 ushort			aPort);
+
+	/**
+	 * for communication
+	 */
+	int Send					(char	* aBuffer,
+								 int	aSize);
+
+	int Receive					(char	* aBuffer,
+								 int	aSize);
+};
+
+#endif // #ifndef __CRXSOCKET_H__
