websGetPort GoAhead WebServer API GoAhead EMF

Synopsis

Returns the TCP/IP port number on which the web server is listening for requests.

Prototype

 #include "webs.h"
 
 int websGetPort(); 

Parameters

None

Description

The websGetPort procedure returns the TCP/IP port number on which the web server is listening for browser requests. The port is configured when the web server is opened via websOpen or reopened via websOpenListen.

Return Value

Returns an integer value > 0 containing the port number. Returns 0 if the port is not opened.

Example

 port = websGetPort(); 
websWrite(wp, "The port number is %d", port); 

Stability Classification

Stable.

See Also

websGetHost, websGetHostUrl, websWrite