val accept : string -> stringval request : host:string -> path:string -> key:string -> stringval response : key:string -> stringval handshake : string -> ((string * string) list * int) optiontype opcode = | Continuation| Text| Binary| Close| Ping| Pong
type frame = {fin : bool;opcode : opcode;payload : string;
}val encode : ?mask:string -> frame -> stringtype decoded = | Frame of frame * int| Incomplete| Bad of string