简体   繁体   English

Socket.io/Node.js和SCTP?

[英]Socket.io/Node.js & SCTP?

I am developing an web application that will use web sockets to dynamically update the website for the user. 我正在开发一个Web应用程序,该应用程序将使用Web套接字为用户动态更新网站。 The idea is to have changes in the back-end engine be dynamically transmitted. 想法是让后端引擎中的更改动态地传输。 In order to do that, I want to use a Node.js server as a link between the web browser and back-end engine. 为此,我想使用Node.js服务器作为Web浏览器和后端引擎之间的链接。 Unfortunately, Node.js/JavaScript does not support SCTP sockets, which is what the back-end engine is using. 不幸的是,Node.js / JavaScript不支持SCTP套接字,这是后端引擎正在使用的套接字。 Can you think of any way around this? 您能想到任何解决方法吗? It would be a shame if I couldn't use Socket.io and would have to deploy my own Javascript plugin & Java websocket server. 如果我不能使用Socket.io,而不得不部署自己的Javascript插件和Java Websocket服务器,那将是一种耻辱。

You can write the SCTP part in C or C++ and then write an addon to make it available in Node.js. 您可以用C或C ++编写SCTP部分,然后编写一个插件以使其在Node.js中可用。 I am currently trying that for one of my projects using SCTP. 我目前正在尝试使用SCTP进行我的项目之一。

Of cource, this is not super elegant, not very portable and it is some extra work, but if you really want to use Node.js, this is one of the possible ways... 当然,这不是超级优雅,也不是很可移植,并且是一些额外的工作,但是如果您真的想使用Node.js,这是可能的方法之一...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM