From: Myun2 Date: Mon, 21 May 2012 10:08:24 +0000 (+0900) Subject: これでも Already Opended か・・・ X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=af7018ed03e01ee1e8bb91070e0d6cdd27573bc9;p=roast%2Froast.git これでも Already Opended か・・・ --- diff --git a/roast/include/roast/io/socket/socket.hpp b/roast/include/roast/io/socket/socket.hpp index 81c35d12..d1fabc6e 100644 --- a/roast/include/roast/io/socket/socket.hpp +++ b/roast/include/roast/io/socket/socket.hpp @@ -71,13 +71,16 @@ namespace roast //socket_(::FILE* fp) : _Base(fp){} socket_(const socket_& from) : _Base(from), m_openparam(from.m_openparam) {} socket_(const char* host, int port) /*: _Base(open_params_type(host, port))*/{ - create_socket(); - open(host, port); + //create_socket(); + //open(host, port); + open(open_params_type(host, port)); } socket_(const char* host, int port, int family, int socktype, int protocol) : - /*_Base(open_params_type(host, port, socktype, family))*/{ - create_socket(family, socktype, protocol); - open(host, port); + /*_Base(open_params_type(host, port, socktype, family))*/ + { + //create_socket(family, socktype, protocol); + //open(host, port); + open(open_params_type(host, port, family, socktype, protocol)); } virtual ~socket_(){} diff --git a/roast/include/roast/windows/socket_impl.hpp b/roast/include/roast/windows/socket_impl.hpp index d34ed8a4..cdda78d6 100644 --- a/roast/include/roast/windows/socket_impl.hpp +++ b/roast/include/roast/windows/socket_impl.hpp @@ -55,6 +55,13 @@ namespace roast type = type_in; protocol = protocol_in; } + open_params_type(const char* host_in, int port_in){ + host = host_in; + port = port_in; + af = AF_INET; + type = SOCK_STREAM; + protocol = protocol; + } }; struct ioctl_data {};