From 479ccb8d1a3b95b3534ad3f563238177a2f63518 Mon Sep 17 00:00:00 2001 From: Roy Razon Date: Sun, 21 Apr 2019 09:02:18 +0300 Subject: [PATCH] Added README --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c06fd00 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# websocket_c +A partial implementation of the WebSocket protocol in C, designed for use in embedded systems + +## Features: + +1. Static memory usage at runtime - no `malloc`s. +2. Caller-provided memory for incoming packets. +3. Supports 30X redirect responses with relative or absolute URLs. +4. Custom HTTP headers (e.g, for authentication) may be provided in the connection request. +5. "Ping" message implementation for heartbeats/keepalive. + +## Building + +`cmake .` + +`make` + +### Tests + +The included "main" will run some unit tests and connect to the URL provided at the command line. +If you don't have a websocket server to test with, see https://github.com/vi/websocat + +### Customization + +* If you're using a custom IP stack, replace gethostbyname and socket calls `read` and `write` with your platform's implementations. +* Remove or replace debug message calls `hex_dump` and `printf`. + +## Input URL format + +See the included "main" for examples of URLs accepted. + + +