websGetHostUrl GoAhead WebServer API GoAhead EMF

Synopsis

Returns the hostname and port as a string suitable for creating URLs

Prototype

#include "webs.h"
   	       
char_t *websGetHostUrl();

Parameters

none

Description

The websGetHostUrl procedure returns a string containing the local server name and port number on which the web server is running. This can be used to create fully qualified URLs.

Return Value

Pointer to a static string containing the hostname and port. If port is 80, the port is omitted.

Example

gsnprintf(path, "http://%s/mypage.htm", websGetHostUrl()); 
websRedirect(wp, path);

See Also

websGetPort, websGetHost, websRedirect