anchor.diff:  
       type StatefulAgent<'S2C, 'C2S, 'State> = WebSocketServer<'S2C, 'C2S> -> Async<'State * ('State -> Message<'S2C> -> Async<'State>)>
   
  +    [<JavaScript>]
       let cacheSocket (socket: WebSocket) decode =
           let cache = Queue()
           let isOpen = ref false
  
positive.code:             Seq.iter post cache
              !isOpen
  
      let getEncoding (encode: 'C2S -> string) (decode: string -> 'S2C) (jsonEncoding: JsonEncoding) =
          let encode, decode =
              match jsonEncoding with
  
negative.code:     | Message of 'T
      | Close
  
  module Client =
      open WebSharper.JavaScript
  
      [<JavaScript>]
      type Message<'S2C> =
          | Message of 'S2C
          | Error
          | Open
          | Close
  
      [<JavaScript>]
      type WebSocketServer<'S2C, 'C2S>(conn: WebSocket, encode: 'C2S -> string) =
          member this.Connection = conn
          member this.Post (msg: 'C2S) = msg |> encode |> conn.Send
  