Tag: groovy

通过websocket客户端/服务器连接问题webrtc

不知道是否有人有什么我在做什么错误在这里: 我一直在: http : //blog.felixhagspiel.de/index.php/posts/create-your-own-videochat-application-with-html-and-javascript 该指南工作得很好,我已经通过nodejs进行了testing,所有工作都非常好。 我现在试图把这个例子转换成groovy。 在一个Grails插件中,并遇到一些问题。 所以这就是我所在的地方:打扰一下我的头撞砖墙的实际代码的状态:) 所有者/服务器创build空间 – 很好 客户来了,发送报价(收到的报价,但客户端断开WebSocket) 服务器/所有者收到报价,但试图发送回答 – 因为客户端断开连接没有发送回…. https://github.com/vahidhedayati/playground/blob/master/grails-wschat-plugin/src/groovy/grails/plugin/wschat/WsCamEndpoint.groovy#L72 这是websocket发送到parsing操作的扩展类的地方: https://github.com/vahidhedayati/playground/blob/master/grails-wschat-plugin/src/groovy/grails/plugin/wschat/ChatUtils.groovy#L244 呼叫: https://github.com/vahidhedayati/playground/blob/master/grails-wschat-plugin/src/groovy/grails/plugin/wschat/ChatUtils.groovy#L570 https://github.com/vahidhedayati/playground/blob/master/grails-wschat-plugin/src/groovy/grails/plugin/wschat/ChatUtils.groovy#L598 https://github.com/vahidhedayati/playground/blob/master/grails-wschat-plugin/src/groovy/grails/plugin/wschat/ChatUtils.groovy#L575 private void jsonmessageUser(Session userSession,String msg) { userSession.getBasicRemote().sendText(msg as String) } private void jsonmessageOther(Session userSession,String msg) { Iterator<Session> iterator=camsessions?.iterator() if (iterator) { while (iterator?.hasNext()) { def crec=iterator?.next() if (crec.isOpen()) { def cuser=crec.getUserProperties().get("camuser").toString() def […]

从Java或Groovy运行node-js

任何人试验如何运行node.js模块或从Java或Groovy的脚本? 可以groovy command.execute()做到这一点? 如果是这样,那么它将在不同的操作系统中performance相同。 值得注意的是,理想情况下,我希望node.js不会依赖于系统和节点命令的安装,而是通过./configure和make打包,以便它可以用作库。 谢谢 编辑:基本上我想这样做,我可以使用node.js模块,客户端框架(咖啡脚本,玉,手写笔等,这是在早午餐bundeled),作为一个Grails插件。 所以这个插件是独立的,没有系统依赖。

使用pipe道插件在jenkins 2.0上安装节点

我正在运行以下docker图像jenkinsci/jenkins:2.0-rc-1来试用jenkins 2.0和“pipe道”视图。 我似乎无法安装节点。 这是我的pipe道脚本: node { //tool([name: 'node-5.10.1', type: 'jenkins.plugins.nodejs.tools.NodeJSInstallation']) sh 'echo $(whoami)' sh 'node -v' } 运行时的响应是: [ci] Running shell script + whoami + echo jenkins jenkins [Pipeline] sh [ci] Running shell script + node -v /../durable-3b0b1b07/script.sh: 2: /../durable-3b0b1b07/script.sh: node: not found 这是我试过的: jenkins NodeJS工具(与自由式作业一起使用时可以正常工作) login到Docker容器并手动安装节点,对于同一个用户: 更新: build立在Jesse Glick的答案下面,我将结果添加到我的脚本PATH : node { def nodeHome […]