Windows 中的 AF

编程入门 行业动态 更新时间:2024-10-25 11:35:07
本文介绍了Windows 中的 AF_UNIX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个应用程序希望在 Windows 上使用.我正在使用 AF_UNIX 系列 un windows.我想知道 AF_UNIX 系列在 windows 中可用.如果没有,那么有没有替代 AF_UNIX 的方法?

I have an application that I wish to use over windows. I am using AF_UNIX family un windows. I wish to know that AF_UNIX family is available in windows. If not then is there any alternate to AF_UNIX ?

谢谢阿尔皮特

推荐答案

编辑:大约从 2018 年开始,Windows 10 支持 AF_UNIX.

Edit: since about 2018, Windows 10 supports AF_UNIX.

devblogs.microsoft/commandline/af_unix-comes-to-windows/

旧答案:

只需使用 TCP 套接字,它们的行为与 UNIX 套接字非常相似.

Just use TCP sockets, they behave very much like UNIX sockets.

或者您可以使用命名管道并使用 WaitForMultipleObjects() 而不是 select() 或 poll().Windows 命名管道与 UNIX 中的命名管道不太一样.Windows 命名管道是双向的,因此更像是 AF_UNIX 套接字而不是 UNIX 中的命名管道.

Or you can use named pipes and use WaitForMultipleObjects() instead of select() or poll(). Windows named pipes are not quite like named pipes in UNIX. Windows named pipes are bi-directional and thus more like AF_UNIX sockets than named pipes in UNIX.

更多推荐

Windows 中的 AF

本文发布于:2023-10-07 15:36:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469793.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Windows   AF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!