简体   繁体   English

如何在Meteor中侦听其他端口以接收数据

[英]How to Listen additional port to receive data in Meteor

How to listen to some additional port to receive data from external service and print the received data whenever the external service sends data…how can I do it in Meteor. 如何侦听一些其他端口以接收来自外部服务的数据并在外部服务发送数据时打印接收到的数据……我如何在Meteor中做到这一点。

Thanks 谢谢

Meteor apps are Node apps, so you can use the modules from the NodeJS API 流星应用程序是Node应用程序,因此您可以使用NodeJS API中的模块

For TCP or IPC use net.Server net.createServer() 对于TCP或IPC,请使用net.Server net.createServer()

For UDP use dgram dgram.createSocket('udp4'); 对于UDP使用dgram dgram.createSocket('udp4');

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

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