From: Mikko Rasa Date: Sat, 6 Aug 2011 20:40:33 +0000 (+0300) Subject: There's no good reason to prefer WASConnect over connect X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5ed4af50473e707d76b22c5394a1ab88be4b3b7c;p=libs%2Fnet.git There's no good reason to prefer WASConnect over connect --- diff --git a/source/streamsocket.cpp b/source/streamsocket.cpp index ed506d6..7ede115 100644 --- a/source/streamsocket.cpp +++ b/source/streamsocket.cpp @@ -33,8 +33,8 @@ bool StreamSocket::connect(const SockAddr &addr) SockAddr::SysAddr sa = addr.to_sys(); + int err = ::connect(priv->handle, reinterpret_cast(&sa.addr), sa.size); #ifdef WIN32 - int err = WSAConnect(priv->handle, reinterpret_cast(&sa.addr), sa.size, 0, 0, 0, 0); if(err==SOCKET_ERROR) { int err_code = WSAGetLastError(); @@ -48,7 +48,6 @@ bool StreamSocket::connect(const SockAddr &addr) throw system_error("connect", err_code); } #else - int err = ::connect(priv->handle, reinterpret_cast(&sa.addr), sa.size); if(err==-1) { if(errno==EINPROGRESS)