wwHTTP::OnHttpPostConnect

This event fires after the Http connection has been established and can be useful to set specific WinInet options on the HTTP connection.

o.OnHttpPostConnect(lnHttpHandle)

Parameters

lnHttpHandle
The HTTP Handle created with the WinInet HttpOpenRequest() call. The Internet handle is also available in wwHttp::hHttpSession.

Remarks

Only fires on calls to HttpGetEx and HttpGet. Not supported on async calls.

Example

DEFINE CLASS MywwHttp as wwHTTP

FUNCTION OnHttpPostConnect()

DECLARE INTEGER InternetSetOption ;
   IN WININET.DLL ;
   INTEGER HINTERNET,;
   INTEGER dwFlags,;
   INTEGER @dwValue,;
   INTEGER cbSize

*** Make the Connection Timeout longer
dwTimeoutSecs= 50 * 1000   && to milliseconds
llRetVal=InternetSetOption(lnHandle,;
   INTERNET_OPTION_CONNECT_TIMEOUT,;
   @dwTimeoutSecs,4)

ENDFUNC

ENDDEFINE

See also:

West Wind Web Connection

© West Wind Technologies, 1996-2019 • Updated: 11/29/16
Comment or report problem with topic