Skip to content

A simple application which uses C library socket.h to demonstrate how to retrieve a HTTP GET request with response 200 and some HTML data.

Notifications You must be signed in to change notification settings

araujo88/websocket-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-websocket-endpoint

An application which uses the C library socket.h to create a server to handle a HTTP GET request with response 200 and HTML data. Must be compiled and run in Unix systems.

From a terminal, compile using:

  • gcc server.c -o server.o

Run the application:

  • ./server.o

In a web browser, type any of the following addresses:

  • localhost:9002
  • 127.0.0.1:9002

Then, the browser should display the page "index.html". If another URL is specified, the server returns a default "Error 404" page.

About

A simple application which uses C library socket.h to demonstrate how to retrieve a HTTP GET request with response 200 and some HTML data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published