     connection.send msg
 
 handleGraphCommand = (command, payload, connection, runtime) ->
+    request = { protocol: 'graph', command: command, payload: payload }
+
     graph = runtime.graph
     if command is "clear"
         graph.inports = {}

        err.message = "Unexpected error: #{err.message}"
        p = Promise.reject(err)

    if p
        p.catch (err) ->
            payload = { message: err.message }
            connection.send { protocol: contents.protocol, command: 'error', payload: payload }

            console.error('FBP PROTOCOL error:', err)
            console.error(err.stack)

    return null


        if contents.protocol is "component"
            p = handleComponentCommand contents.command, contents.payload, connection, runtime
        else if contents.protocol is "graph"
            p = handleGraphCommand contents.command, contents.payload, connection, runtime
        else if contents.protocol is "runtime"
            p = handleRuntimeCommand contents.command, contents.payload, connection, runtime
        else if contents.protocol is "network"
