mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
80a47f1111
WebSocket is a bit weird: 1. It starts like an HTTP connection, but they send special headers. 2. We reply with special headers, one of which involves SHA1 of one of theirs. 3. We are then in WebSocket mode, where each frame starts with a 2-20 byte header. We relay data in a simplistic way: if either side sends something, we read it and relay it synchronously. That avoids any gratuitous buffering. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 lines
248 B
C
10 lines
248 B
C
#ifndef LIGHTNING_CONNECTD_SHA1_H
|
|
#define LIGHTNING_CONNECTD_SHA1_H
|
|
#include "config.h"
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
extern int sha1digest(uint8_t *digest, const uint8_t *data, size_t databytes);
|
|
|
|
#endif /* LIGHTNING_CONNECTD_SHA1_H */
|