I modified the code in foo_sample. Added play_callback_impl_base & abort_callback to CMyElemWindow & try to get something with http_client when playback starts.
class CMyElemWindow :
public ui_element_instance,
public CWindowImpl<CMyElemWindow>,
private play_callback_impl_base,
private abort_callback
{
// ...
static_api_ptr_t<http_client> m_http_client;
// ...
};
void CMyElemWindow::on_playback_starting(play_control::t_track_command p_command,bool p_paused) {
try {
auto request = m_http_client->create_request("GET");
auto result = request->run("http://localhost/",*this);
// .. do something
} catch (pfc::exception&e) {
hehe = e.what();
}
update();
}
Calling request->run throws an exception with error message "Incorrect DNS query behavior".
This error remains when replace "localhost" with "127.0.0.1".
My question is :
Why it occurs and how to solve this problem ?