Windows中的AF_UNIX [英] AF_UNIX in windows

查看:907
本文介绍了Windows中的AF_UNIX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个希望在Windows上使用的应用程序.我正在Windows下使用AF_UNIX系列.我想知道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 ?

谢谢 Arpit

推荐答案

编辑:自2018年左右开始,Windows 10支持AF_UNIX.

Edit: since about 2018, Windows 10 supports AF_UNIX.

https://devblogs.microsoft.com/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命名管道是双向的,因此比UNIX中的命名管道更像AF_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_UNIX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆