Handshake routines.
More...
#include <base64.h>
#include <sha1.h>
#include <ws.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
|
int | get_handshake_accept (char *wsKey, unsigned char **dest) |
| Gets the field Sec-WebSocket-Accept on response, by an previously informed key. More...
|
|
int | get_handshake_response (char *hsrequest, char **hsresponse) |
| Gets the complete response to accomplish a succesfully handshake. More...
|
|
◆ _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L |
◆ get_handshake_accept()
int get_handshake_accept |
( |
char * |
wsKey, |
|
|
unsigned char ** |
dest |
|
) |
| |
Gets the field Sec-WebSocket-Accept on response, by an previously informed key.
- Parameters
-
wsKey | Sec-WebSocket-Key |
dest | source to be stored the value. |
- Returns
- Returns 0 if success and a negative number otherwise.
- Attention
- This is part of the internal API and is documented just for completeness.
◆ get_handshake_response()
int get_handshake_response |
( |
char * |
hsrequest, |
|
|
char ** |
hsresponse |
|
) |
| |
Gets the complete response to accomplish a succesfully handshake.
- Parameters
-
hsrequest | Client request. |
hsresponse | Server response. |
- Returns
- Returns 0 if success and a negative number otherwise.
- Attention
- This is part of the internal API and is documented just for completeness.