123456789101112131415161718192021222324252627282930313233343536373839404142434445464748open!Coretypet=|Continuation|Text|Binary|Close|Ping|Pong(*
RFC 6455:
Opcodes 0x3-0x7 are reserved for further non-control frames yet to be defined.
Opcodes 0xB-0xF are reserved for further control frames yet to be defined.
*)|Ctrlof(int[@quickcheck.generatorInt.gen_incl0xB0xF])|Nonctrlof(int[@quickcheck.generatorInt.gen_incl0x30x7])[@@derivingsexp_of,equal,quickcheck]letof_inti=matchiland0xfwith|0x0->Continuation|0x1->Text|0x2->Binary|0x8->Close|0x9->Ping|0xA->Pong|iwheni>2&&i<8->Nonctrli|i->Ctrli;;letto_int=function|Continuation->0x0|Text->0x1|Binary->0x2|Close->0x8|Ping->0x9|Pong->0xA|Ctrli|Nonctrli->i;;typekind=|Control|Non_controlletto_kind=function|Close|Ping|Pong|Ctrl_->Control|Continuation|Text|Binary|Nonctrl_->Non_control;;