 {format} = require "util"
 {STATUS_CODES} = require "http"
 {EventEmitter2} = require "eventemitter2"
-{urlOfServer} = require "./../nucleus/tools"
+{urlOfMaster} = require "./../nucleus/tools"
 {remote, external} = require "./remote"
 {Barebones} = require "./skeleton"
 {Preflight} = require "./preflight"

    feedback: external ->
        i = "please see browser console for information"
        p = "an exception happend at the server provider"
        c = "error raised during socket connection, #{i}"
        connecting = "attempting connection at #{@location}"
        disconnect = "lost socket connection at #{@location}"
        reconnecting = "attempting to reconnect at #{@location}"

        pure = /[a-zA-Z0-9/-_]+/.test @location()
        assert pure, "location is not pure enough"
        context.scripts.push "/socket.io/socket.io.js"
        context.duplex = urlOfMaster yes, @location()
        context.providers = new Array
        _.forIn this, (value, name, service) =>
            providing = value?.providing or null
