SockAddr::SysAddr sa = addr.to_sys();
+ int err = ::connect(priv->handle, reinterpret_cast<sockaddr *>(&sa.addr), sa.size);
#ifdef WIN32
- int err = WSAConnect(priv->handle, reinterpret_cast<sockaddr *>(&sa.addr), sa.size, 0, 0, 0, 0);
if(err==SOCKET_ERROR)
{
int err_code = WSAGetLastError();
throw system_error("connect", err_code);
}
#else
- int err = ::connect(priv->handle, reinterpret_cast<sockaddr *>(&sa.addr), sa.size);
if(err==-1)
{
if(errno==EINPROGRESS)