[英]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.