webserver

NOTE:  To build this sample in Visual Studio 2015 in a RTSSRelease configuration, you must add the following libraries in Properties > Input:

Description

The WebServer example includes a collection of files that demonstrate a sample web server.

Source Files

Components of the example are located in the directories listed in the table below.

Directory

Description

Httpserv

HTTP Server files. These files implement an HTTP/1.0 server that complies with RFC 1945.

Htmlpage

HTML Page files. The functions in these files are the interface used to build HTML pages in memory (finding URIs in the data structures, handling common errors, etc.).

Html

HTML itself, not including forms. The functions in these files allow you to easily format real time data in HTML for display by a web server. These files create all the HTML in memory and does not create any disk file. If you want to save the HTML to disk, your application must open and write file.

Htmlform

HTML form file. This file is analogous to those in the Html folder, but the functions are for creating forms and decoding the returned form data.

Webmem

A sample web server that constructs HTML pages in memory.

APIs Referenced

\htmlpage\HTMLDLL.c

Win32 APIs

FreeLibrary

GetLastError

GetProcAddress

LoadLibrary

\httpserv\LOCALLOC.c

Win32 APIs

HeapAlloc

GetProcessHeap

SetLastError

\httpserv\HTTPSERV.c

RTAPI

Win32 APIs

Winsock BSD APIs

RtAttachShutdownHandler

RtPrintf

RtReleaseShutdownHandler

CloseHandle

GetLastError

GetProcessHeap

HeapAlloc

HeapFree

Sleep

accept

bind

closesocket

getsockname

htonl

htons

inet_ntoa

ioctlsocket

listen

ntohs

recv

send

socket

WSACleanup

WSAGetLastError

WSAStartUp

\inc\HEAP.h

Win32 APIs

SetLastError

\webmem\webmem.c

Win32 APIs

Sleep

See Also

WebServer

IntervalZero.com | Support | Give Feedback