Fixed Spotify.Play
and fixed TCP.Connect
.
This commit is contained in:
parent
4e887b1ac2
commit
fa2b801690
@ -213,13 +213,23 @@ namespace ehs
|
||||
return;
|
||||
|
||||
remoteHostName = address;
|
||||
remoteAddr = DNS::Resolve(address);
|
||||
remotePort = port;
|
||||
|
||||
if (addrType == AddrType::IPV6)
|
||||
{
|
||||
if (IsIPv6Only())
|
||||
remoteAddr = DNS::Resolve(AddrType::IPV6, address);
|
||||
else
|
||||
remoteAddr = DNS::Resolve(address);
|
||||
|
||||
Connect_v6(remoteAddr, port);
|
||||
}
|
||||
else if (addrType == AddrType::IPV4)
|
||||
{
|
||||
remoteAddr = DNS::Resolve(AddrType::IPV4, address);
|
||||
|
||||
Connect_v4(remoteAddr, port);
|
||||
}
|
||||
|
||||
connected = true;
|
||||
}
|
||||
|
@ -242,13 +242,23 @@ namespace ehs
|
||||
return;
|
||||
|
||||
remoteHostName = address;
|
||||
remoteAddr = DNS::Resolve(address);
|
||||
remotePort = port;
|
||||
|
||||
if (addrType == AddrType::IPV6)
|
||||
{
|
||||
if (IsIPv6Only())
|
||||
remoteAddr = DNS::Resolve(AddrType::IPV6, address);
|
||||
else
|
||||
remoteAddr = DNS::Resolve(address);
|
||||
|
||||
Connect_v6(remoteAddr, port);
|
||||
}
|
||||
else if (addrType == AddrType::IPV4)
|
||||
{
|
||||
remoteAddr = DNS::Resolve(AddrType::IPV4, address);
|
||||
|
||||
Connect_v4(remoteAddr, port);
|
||||
}
|
||||
|
||||
connected = true;
|
||||
}
|
||||
|
@ -155,9 +155,6 @@ namespace ehs
|
||||
Request req(Verb::PUT, "/v1/me/player/play");
|
||||
req.BearerAuth(token);
|
||||
|
||||
client.Release();
|
||||
client.Initialize();
|
||||
client.Connect("", SSL::HTTPS_Port);
|
||||
client.SendReq(req);
|
||||
|
||||
Response res = client.RecvRes();
|
||||
@ -590,7 +587,7 @@ namespace ehs
|
||||
|
||||
bool Spotify::ReAuthorize()
|
||||
{
|
||||
SSL accounts;
|
||||
SSL accounts(AddrType::IPV4);
|
||||
accounts.Initialize();
|
||||
accounts.Connect("accounts.spotify.com", SSL::HTTPS_Port);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user