HRESULT CDataConnector::RequestHTTP(BSTR IpAddress, BSTR Path, BSTR* pVal) { HRESULT hr = E_OUTOFMEMORY; CString sResponse(_T("")); CHTTPParser HTTPParser; if(HTTPParser.HTTPGet(IpAddress, Path, sResponse)) { *pVal = CComBSTR(sResponse).Copy(); hr = S_OK; } else hr = E_OUTOFMEMORY; return hr; }
void OnRead(){ std::vector<char> sResponse(_super_t::bytes_available(), 0); _super_t::read(sResponse); DUMP(sResponse.size()); }