Shuts down the connection established by WebTcpipConnect.
WebAPI.bdh
WebTcpipShutdown( inout hWeb : number, in nMode : number optional ): boolean;
true if the shutdown succeeded
false otherwise
Parameter | Description |
---|---|
hWeb | Valid handle to a Web connection that was created by WebTcpipConnect |
nMode |
Determines the shutdown mode (optional). Any of the following options is possible:
|
dcltrans transaction TWeb var hWeb : number; sHdr : string; sSize : string(20); nReceived : number; begin WebTcpipConnect(hWeb, "lab3", 80); sHdr := "GET /file5k.html HTTP/1.1\r\n" "Host: lab3\r\n\r\n"; // send HTTP request header WebTcpipSend(hWeb, sHdr); // receive HTTP response header WebTcpipRecvUntil(hWeb, sHdr, STRING_COMPLETE, nReceived, "\r\n\r\n"); // receive document StrSearchDelimited(sSize, STRING_COMPLETE, sHdr, "Content-Length: ",1,"\r\n", 1, STR_SEARCH_FIRST); WebTcpipRecvExact(hWeb, NULL, number(sSize)); // reset the persistent connection WebTcpipShutdown(hWeb, WEB_SHUTDOWN_RESET); end TWeb;
WebFileUpload01.bdf, WebMulti01.bdf, WebSecure01.bdf, WebTcpipHttp11.bdf, WebTcpipWebStone01.bdf