             else
                 resp = message.success(id:mesg.id)
             socket.write_mesg('json', resp)
-
 
     read_from_disk: (socket, mesg) =>
         fs.readFile @path, (err, data) =>

            write_mesg('error', {error:"client #{mesg.client_id} not registered for synchronization"})
            return

        if @_client_sync_lock # or Math.random() <= .5 # (for testing)
            winston.debug("client_diffsync hit a sync lock -- send retry message back")
            write_mesg('error', {error:"retry"})


        @write_mesg('diffsync_ready')


# TODO:
class CodeMirrorSession
    constructor: (mesg, cb) ->
        @path = mesg.path
