简体   繁体   English

如何连接到Node.js中的抽象命名空间Unix系列地址?

[英]How can one connect to an abstract namespace unix family address in nodejs?

Has anybody tried to connect to an abstract namespace path (which starts with a null character) on unix family addresses in nodejs? 是否有人试图连接到Node.js中Unix系列地址上的抽象名称空间路径(以空字符开头)? The problem seems to be that node internally sets the encoding of the path to ascii and consequently converts '\\0' to space character. 问题似乎在于,节点在内部将路径的编码设置为ascii,因此将“ \\ 0”转换为空格字符。 I tried buffers but didn't change anything. 我尝试了缓冲区,但没有进行任何更改。

If you wanna know what "abstract namespace" in unix address family means see the paragraph titled "abstract:" in "Address format" section of this link: http://man7.org/linux/man-pages/man7/unix.7.html 如果您想知道Unix地址族中的“抽象名称空间”是什么意思,请参见此链接的“地址格式”部分中标题为“抽象:”的段落: http : //man7.org/linux/man-pages/man7/unix。 7.html

似乎应该将特殊模块用于: https : //www.npmjs.org/package/abstractsocket

Since 0.12 this is supported by the core net module. 从0.12开始,核心网模块支持此功能。

For 0.10: The the module proposed by socketpair uses child process api and an external utility socat (similar to netcat), and does not let you create servers, just client connections. 对于0.10:套接字对建议的模块使用子进程api和外部实用程序socat(类似于netcat),并且不允许您创建服务器,而只能创建客户端连接。 A better alternative is https://www.npmjs.com/package/abstract-socket - it is a binary module instead. 更好的替代方法是https://www.npmjs.com/package/abstract-socket-相反,它是一个二进制模块。

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

相关问题 LXD-如何通过Node.js下的Unix套接字域连接到LXD API? - LXD - How can connect to the LXD API via unix socket domain under nodejs? 如何使用Node.js获取Linux和Unix系统的Mac地址 - How to get mac address of a Linux and Unix system using Nodejs 当一个父母有多个使用nodejs的孩子时,如何打印家谱中的关系? - How to print the relationships in a family tree when one parent has multiple no of children using nodejs? 使用集群(NDBCluster或Galera)时,nodejs应用程序如何连接到故障转移MySQL服务器之一? - How can a nodejs app connect to one of the failover MySQL servers when using clustering (NDBCluster or Galera)? 如何在Node.js Connect中使用错误处理程序 - How can I use errorhandler in nodejs connect 如何从Node.js连接到mysql? - How can I connect to mysql from nodejs? NodeJS ZCCADCDEDB567ABAE643E15DCF0974E503Z 可以从一个 linux 目录连接,但不能从另一个目录连接 - NodeJS Mongoose can connect from one linux directory but not another NodeJS 无法连接到 Redis - NodeJS can not connect to Redis 如何解决 RangeError ERR_INVALID_ADDRESS_FAMILY: Invalid address family - How to solve RangeError ERR_INVALID_ADDRESS_FAMILY: Invalid address family 如何仅使用本地机器上的一个端口将我的 NodeJS/Express 后端连接到我的 VueJS 前端? - How can I connect my NodeJS/Express backend to my VueJS frontend using only one port on my local machine?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM