Documentation
¶
Overview ¶
Command wssserver is a test fixture for the C/C++ SDK tests: a WebSocket server speaking the etunnel wire protocol with a throwaway self-signed certificate. It exists so the SDK tests can assert that TLS verification actually rejects a certificate the OS does not trust (#49).
Modes:
welcome - accept, read hello, send one welcome, keep the socket open
drama - welcome, then a req+FIN pair whose local target is expected to
be slow, then close the socket abruptly 300ms later. This is the
disconnect-while-curl-is-running scenario for the lifecycle test.
hellocheck - verify hello.version == ET_TEST_VERSION (HELLO_VERSION_OK /
HELLO_BAD), then answer a welcome.
outdated - answer hello with {"type":"error","code":"client_outdated"}
(ET_TEST_OUTDATED_MSG overrides the text) and close.