anchor.diff:          match send id.id_out c.ns c_write tlen Alert (TLSFragment.FAlert(f)) with
           | Correct(new_write) ->
               let new_write = {new_write with disp = Closed} in
  -            let ad = readNonAppDataFragment id c.appdata in
  +            let ad = AppDataStream.readNonAppDataFragment id c.appdata in
               let c = {c with alert = new_al_state;
                               appdata = ad;
                               write = new_write}
  
positive.code:                             (* Also move to the Finished state *)
                              let c_write = {new_write with disp = Finished} in
                              let c = { c with handshake = new_hs_state;
                                               appdata = readNonAppDataFragment id c.appdata;
                                               write     = c_write }
                              (correct (WriteAgain), Conn(id,c))
                            | Error (x,y) -> let closed = closeConnection (Conn(id,c)) in (Error(x,y), closed) (* Unrecoverable error *)
  
negative.code:     | Correct (Alert.ALClose_notify (state)) ->
          (* An outgoing close notify has already been buffered, if necessary *)
          (* Only close the reading side of the connection *)
          let ad = AppDataStream.writeNonAppDataFragment id c.appdata in
          let new_seqn = c_read.seqn + 1 in
          let new_read = {c_read with seqn = new_seqn; disp = Closed} in
          (correct (Abort), Conn(id, { c with appdata = ad; read = new_read}))
      | Correct (Alert.ALClose (state)) ->
          (* Other fatal alert, we close both sides of the connection *)
          let ad = AppDataStream.writeNonAppDataFragment id c.appdata in
          let new_seqn = c_read.seqn + 1 in
          let new_read = {c_read with seqn = new_seqn} in
          let c = {c with read = new_read; appdata = ad; alert = state}
  