 ws_label() {
        var nodeid = (this.client)?this.client:this.server;
        var wsNode = RED.nodes.node(nodeid);
        return this.name||(wsNode?"[ws] "+wsNode.label():"websocket");
    }

    function ws_validateserver() {
        if ($("#node-input-mode").val() === 'client' || (this.client && !this.server)) {
            return true;
        }
        else {
            if (RED.nodes.node(this.server) != null) {
                return true;
            }
            return RED._("node-red:websocke