websGetPort | GoAhead WebServer API | GoAhead EMF |
Returns the TCP/IP port number on which the web server is listening for requests.
#include "webs.h"; int websGetPort();
None |
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 websOpenServer or reopened via websOpenListen.
Returns an integer value > 0 containing the port number. Returns 0 if the port is not opened.
port = websGetPort(); websWrite(wp, "The port number is %d", port);