diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-12-27 16:32:33 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-12-27 16:32:33 -0800 |
| commit | 5ff3d3d3ab82be4b2171e06f1def9cdddaef4115 (patch) | |
| tree | 028fff3d0dbcbec741406541931029c106bae465 /src/transport/ws/websocket.h | |
| parent | eb1f8db4ed87867f0f08afba79253e3981db9c88 (diff) | |
| download | nng-5ff3d3d3ab82be4b2171e06f1def9cdddaef4115.tar.gz nng-5ff3d3d3ab82be4b2171e06f1def9cdddaef4115.tar.bz2 nng-5ff3d3d3ab82be4b2171e06f1def9cdddaef4115.zip | |
fixes #180 add websocket header properties
Diffstat (limited to 'src/transport/ws/websocket.h')
| -rw-r--r-- | src/transport/ws/websocket.h | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/src/transport/ws/websocket.h b/src/transport/ws/websocket.h index 1beb6156..2e86aaf0 100644 --- a/src/transport/ws/websocket.h +++ b/src/transport/ws/websocket.h @@ -11,52 +11,16 @@ #ifndef NNG_TRANSPORT_WS_WEBSOCKET_H #define NNG_TRANSPORT_WS_WEBSOCKET_H -// TLS transport. This is used for communication via TLS v1.2 over TCP/IP. +// WebSocket transport. This is used for communication via WebSocket. NNG_DECL int nng_ws_register(void); -// TLS options. Note that these can only be set *before* the endpoint is -// started. Once started, it is no longer possible to alter the TLS -// configuration. +// NNG_OPT_TLS_REQUEST_HEADERS is a string containing the +// request headers, formatted as CRLF terminated lines. +#define NNG_OPT_WS_REQUEST_HEADERS "ws:request-headers" -// NNG_OPT_TLS_CA_CERT is a string with one or more X.509 certificates, -// representing the entire CA chain. The content may be either PEM or DER -// encoded. -#define NNG_OPT_TLS_CA_CERT "tls:ca-cert" - -// NNG_OPT_TLS_CRL is a PEM encoded CRL (revocation list). Multiple lists -// may be loaded by using this option multiple times. -#define NNG_OPT_TLS_CRL "tls:crl" - -// NNG_OPT_TLS_CERT is used to specify our own certificate. At present -// only one certificate may be supplied. (In the future it may be -// possible to call this multiple times, for servers that select different -// certificates depending upon client capabilities.) -#define NNG_OPT_TLS_CERT "tls:cert" - -// NNG_OPT_TLS_PRIVATE_KEY is used to specify the private key used -// with the given certificate. This should be called after setting -// the certificate. The private key may be in PEM or DER format. -// If in PEM encoded, a terminating ZERO byte should be included. -#define NNG_OPT_TLS_PRIVATE_KEY "tls:private-key" - -// NNG_OPT_TLS_PRIVATE_KEY_PASSWORD is used to specify a password -// used for the private key. The value is an ASCIIZ string. -#define NNG_OPT_TLS_PRIVATE_KEY_PASSWORD "tls:private-key-password" - -// NNG_OPT_TLS_AUTH_MODE is an integer indicating whether our -// peer should be verified or not. It is required on clients/dialers, -// and off on servers/listeners, by default. -#define NNG_OPT_TLS_AUTH_MODE "tls:auth-mode" - -extern int nng_tls_auth_mode_required; -extern int nng_tls_auth_mode_none; -extern int nng_tls_auth_mode_optional; - -// NNG_OPT_TLS_AUTH_VERIFIED is a boolean that can be read on pipes, -// indicating whether the peer certificate is verified. -#define NNG_OPT_TLS_AUTH_VERIFIED "tls:auth-verified" - -// XXX: TBD: Ciphersuite selection and reporting. Session reuse? +// NNG_OPT_TLS_RESPONSE_HEADERS is a string containing the +// response headers, formatted as CRLF terminated lines. +#define NNG_OPT_WS_RESPONSE_HEADERS "ws:response-headers" #endif // NNG_TRANSPORT_WS_WEBSOCKET_H |
