├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── test ├── cases │ ├── 16_bit_frame_length │ ├── continuation_after_fin │ ├── continuation_at_beginning │ ├── fragmented_control_frame │ ├── fragmented_frames │ ├── interleaved_control_frames │ ├── invalid_opcode │ ├── masking │ ├── masking_empty_frames │ ├── non_canonical_16_bit_length │ ├── non_canonical_64_bit_length │ ├── rejects_too_long_control_frames │ ├── reserved_bits │ ├── simple │ └── zero_length_frames ├── driver.rb └── parse.c ├── ws_parser.c └── ws_parser.h /.gitignore: -------------------------------------------------------------------------------- 1 | /test/parse 2 | 3 | *.o 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/README.md -------------------------------------------------------------------------------- /test/cases/16_bit_frame_length: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/16_bit_frame_length -------------------------------------------------------------------------------- /test/cases/continuation_after_fin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/continuation_after_fin -------------------------------------------------------------------------------- /test/cases/continuation_at_beginning: -------------------------------------------------------------------------------- 1 | "\x00\x05hello" 2 | 3 | error: -3 WS_INVALID_CONTINUATION 4 | -------------------------------------------------------------------------------- /test/cases/fragmented_control_frame: -------------------------------------------------------------------------------- 1 | "\x08\x04ping" 2 | 3 | error: -6 WS_FRAGMENTED_CONTROL 4 | -------------------------------------------------------------------------------- /test/cases/fragmented_frames: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/fragmented_frames -------------------------------------------------------------------------------- /test/cases/interleaved_control_frames: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/interleaved_control_frames -------------------------------------------------------------------------------- /test/cases/invalid_opcode: -------------------------------------------------------------------------------- 1 | "\x8f" 2 | 3 | error: -2 WS_INVALID_OPCODE 4 | -------------------------------------------------------------------------------- /test/cases/masking: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/masking -------------------------------------------------------------------------------- /test/cases/masking_empty_frames: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/masking_empty_frames -------------------------------------------------------------------------------- /test/cases/non_canonical_16_bit_length: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/non_canonical_16_bit_length -------------------------------------------------------------------------------- /test/cases/non_canonical_64_bit_length: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/non_canonical_64_bit_length -------------------------------------------------------------------------------- /test/cases/rejects_too_long_control_frames: -------------------------------------------------------------------------------- 1 | "\x89\x7e\x01\x02#{"x" * 258}" 2 | 3 | control_begin: ping 4 | error: -4 WS_CONTROL_TOO_LONG 5 | -------------------------------------------------------------------------------- /test/cases/reserved_bits: -------------------------------------------------------------------------------- 1 | "\xff" 2 | 3 | error: -1 WS_RESERVED_BITS_SET 4 | -------------------------------------------------------------------------------- /test/cases/simple: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/simple -------------------------------------------------------------------------------- /test/cases/zero_length_frames: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/cases/zero_length_frames -------------------------------------------------------------------------------- /test/driver.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/driver.rb -------------------------------------------------------------------------------- /test/parse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/test/parse.c -------------------------------------------------------------------------------- /ws_parser.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/ws_parser.c -------------------------------------------------------------------------------- /ws_parser.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haileys/ws_parser/HEAD/ws_parser.h --------------------------------------------------------------------------------