Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi all,

The configuration below on simulator is OK.

BUt the same configuration on FFA that can't connect network.

Please give some advice to me, Thanks in Advance!

// set the IWeb connect timeout to 10 seconds. this also sets the
// failover timeout, if unset, or set to 0, IWeb uses the system
// default (30 seconds unless an OEM changes it)
awo[i].nId = WEBOPT_CONNECTTIMEOUT;
awo[i].pVal = (void *)10000;
i++;

// test user-agent, uncomment this section to ship your own user-agent
// string. if unset, IWeb will send a default. If set to NULL, no
// user agent header will be sent */

// Set TEST_USER_AGENT in the NetDiagnostics project settings to all
// shipping of your own user agent.

#ifdef TEST_USER_AGENT
awo[i].nId = WEBOPT_USERAGENT;
awo[i].pVal = (void *)WEBBER_USERAGENT;
i++;
#endif

// test nowaitconn, this only comes into effect if you build webber
// with multiple WebActions (see the definition of struct Webber)
awo[i].nId = WEBOPT_FLAGS;
awo[i].pVal = (void *)WEBREQUEST_NOWAITCONN;
i++;

// test forcenew, uncomment this section to try multiple simultaneous
// "forced" new connections. Forced new connections are not kept alive
// unless they are the first forced new connection to a host
#ifdef TEST_FORCENEWCONN
awo[i].nId = WEBOPT_FLAGS;
awo[i].pVal = (void *)WEBREQUEST_FORCENEWCONN;
i++;
#endif

// turn off HTTP over HTTP proxying
awo[i].nId = WEBOPT_PROXYSPEC;
awo[i].pVal = (void *)"http:///";
i++;

// turn on ALL proxying. Proxyspecs are examined in WebOpt
// order, so in this list, with the above and below PROXYSPECs,
// everything except HTTP will be proxied through
// http://webproxy.yourdomain.com:8080, (which you'll have to
// set up to test, sorry
awo[i].nId = WEBOPT_PROXYSPEC;
awo[i].pVal = (void *)"*:///http://webproxy.yourdomain.com:8080";
i++;

// Marks the end of the array of WebOpts
awo[i].nId = WEBOPT_END;

// Add Options
IWEB_AddOpt(pMe->piWeb, awo);
IWIDGET_SetIWeb(pMe->pIBrwWidget, pMe->piWeb);
IWIDGET_LoadURL(pIWidget,pMe->pcURL,NULL);

Regards,
Kenson

I think you used wrong type in
IWEB_AddOpt(pMe->piWeb, awo);
The first argument shall be (IWebOpts *pIWebOpts).
You should use this function to add web options:
int IWEBOPTS_AddOpt(IWebOpts *pIWebOpts, WebOpt *apwoz);

I think you used wrong type in
IWEB_AddOpt(pMe->piWeb, awo);
The first argument shall be (IWebOpts *pIWebOpts).
You should use this function to add web options:
int IWEBOPTS_AddOpt(IWebOpts *pIWebOpts, WebOpt *apwoz);