@@ -292,7 +292,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
292292 vSocks5Init.push_back (0x01 ); // # METHODS
293293 vSocks5Init.push_back (0x00 ); // X'00' NO AUTHENTICATION REQUIRED
294294 }
295- ssize_t ret = send (hSocket, (const char *)begin_ptr ( vSocks5Init), vSocks5Init.size (), MSG_NOSIGNAL);
295+ ssize_t ret = send (hSocket, (const char *)vSocks5Init. data ( ), vSocks5Init.size (), MSG_NOSIGNAL);
296296 if (ret != (ssize_t )vSocks5Init.size ()) {
297297 CloseSocket (hSocket);
298298 return error (" Error sending to proxy" );
@@ -317,7 +317,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
317317 vAuth.insert (vAuth.end (), auth->username .begin (), auth->username .end ());
318318 vAuth.push_back (auth->password .size ());
319319 vAuth.insert (vAuth.end (), auth->password .begin (), auth->password .end ());
320- ret = send (hSocket, (const char *)begin_ptr ( vAuth), vAuth.size (), MSG_NOSIGNAL);
320+ ret = send (hSocket, (const char *)vAuth. data ( ), vAuth.size (), MSG_NOSIGNAL);
321321 if (ret != (ssize_t )vAuth.size ()) {
322322 CloseSocket (hSocket);
323323 return error (" Error sending authentication to proxy" );
@@ -347,7 +347,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
347347 vSocks5.insert (vSocks5.end (), strDest.begin (), strDest.end ());
348348 vSocks5.push_back ((port >> 8 ) & 0xFF );
349349 vSocks5.push_back ((port >> 0 ) & 0xFF );
350- ret = send (hSocket, (const char *)begin_ptr ( vSocks5), vSocks5.size (), MSG_NOSIGNAL);
350+ ret = send (hSocket, (const char *)vSocks5. data ( ), vSocks5.size (), MSG_NOSIGNAL);
351351 if (ret != (ssize_t )vSocks5.size ()) {
352352 CloseSocket (hSocket);
353353 return error (" Error sending to proxy" );
0 commit comments