Need more information about commander, especially Interface of commander with outside. Such as base on http or just socket.
>From ur description, I guest commander is socket communication. If that, u should try Net <http://nodejs.org/api/net.html> of nodejs. 在 2014年1月9日星期四UTC+8上午5时24分21秒,James Newton写道: > > Hello node experts! > > A web socket connection to a node server sends a header with each message. > I am looking for a way to forward just the message to a third-party > application running on the server. > > The scenario: We have a robot (for want of a better word) that is used for > medical diagnosis. This robot is currently controlled by a hardware > console. The console sends and receives plain text strings to an > application which commands the robot. Let's call this application the > Commander. > > Two programmers are working on creating an app that can run on an iPad (or > other tablet), to replace the console. My role is to create the iPad app, > my colleague has all the low-level knowledge required for controlling the > robot. > > We have been experimenting with using a Node.js server and WebSocket to > create a connection. My app sends the server the string required by the > Commander application, like this: > > webSocketInstance.send(string) > > My colleague reports that the Commander application receives a message > with a header like this... > > GET / HTTP/1.1Origin: null > Sec-WebSocket-Protocol: echo-protocol > Sec-WebSocket-Key: 5oLKa2EzNd9EGxAcyS72RQ== > ConnecUpgrade > Upgrade: Websocket > Sec-WebSocket-Version: 13 > Us... > > ... when he is expecting a string that looks like this: > > '040100040001' > > We don't want to change the Commander application, because if we do, it > will no longer respond to the hardware console. We are looking for a way of > stripping the header so that the Node.js application on the server can > mimic the console perfectly. > > My question: is there a module that we can use on the server to forward > just the expected string to the existing Commander application? > > I am fairly new to Node.js and fairly experienced with JavaScript. > > Thanks in advance for any enlightenment, > > James > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
