您是否想问 Mac OS X 的内容<sys/socket.h>与 Linux 的版本是否相同?不,Mac OS X 的标头是基于 BSD 的。
> man socket
Run Code Online (Sandbox Code Playgroud)SOCKET(2) BSD System Calls Manual SOCKET(2) NAME socket -- create an endpoint for communication SYNOPSIS #include <sys/socket.h> int socket(int domain, int type, int protocol); DESCRIPTION Socket() creates an endpoint for communication and returns a descriptor. The domain parameter specifies a communications domain within which com-
如果您询问两个平台之间是否存在源代码兼容性,那么是的,只要源代码坚持可移植接口即可。
如果您正在考虑可能需要重写套接字内容的其他原因,我想这取决于您当前的代码在为 OS X 构建时是否满足您的要求。
| 归档时间: |
|
| 查看次数: |
7498 次 |
| 最近记录: |