Differences between winsock and BSD socket implementations

前端 未结 2 1309
温柔的废话
温柔的废话 2021-02-09 02:17

What are the major differences between Winsock and *nix BSD socket implementations?

2条回答
  •  鱼传尺愫
    2021-02-09 02:36

    You might want to look here.
    To that, I'd drop one more difference, winsocks supports overlapped I/O (with callbacks etc.) through functions like WSARecv (and other similar), which can make porting to bsd-sockets harder. Also, most functions in winsocks has their Wsa* counterpart, which sometimes offers more options (or at least requires more parameters ;) ), like [recv](http://msdn.microsoft.com/en-us/library/ms740121(VS.85).aspx) and [WSARecv](http://msdn.microsoft.com/en-us/library/ms741688(VS.85).aspx).

提交回复
热议问题