javascript - OpenWhisk - socket.io - client possible? -
i trying use socket.io openwhisk action. want use websocket client, cannot seem work. socket.io client supported, or server?
edit client sample http://socket.io/docs/
var io = require('socket.io'); var socket = io('ws://noderedjo2.mybluemix.net/ws/luftkvalitet/aqmeasure'); socket.on('connect', function () { socket.send('hi'); });
this gives typeerror undefined not function. (on io(...).
i guess 1 has stand ws server, in node.js samples on same page...?!
cheers -jo2
openwhisk not support websocket client library part of node.js action containers. packages supported listed here. i've opened issue add commonly used ones image use-case laid out (running openwhisk action , pushing websocket) sounds useful.
socket.io
seems able spin server, not suitable openwhisk action, short-running. socket.io-client
(i suggested add that) needed connect websocket server.
Comments
Post a Comment