websGetRequestDocFd GoAhead WebServer API GoAhead EMF

Synopsis

Return the document file handle for the current web page

Prototype

#include "webs.h"

int websGetRequestDocFd(webs_t wp);

Parameters

wp Web server connection handle.

Description

The websGetRequestDocFd procedure returns the web page file handle defined for this browser connection. This is only defined if a URL Handler has set the handle via websSetDocFd.

Return Value

Returns -1 if there is no document handle defined. Otherwise the handle is returned.

Example

fd = websGetRequestDocFd(wp);
read(fd, buf, sizeof(buf);

See Also

websGetRequestBytes, websSetRequestPath, websSetRequestDocFd