10

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

pattivacek
  • 5,617
  • 5
  • 48
  • 62
Ankur
  • 11,239
  • 22
  • 63
  • 66
  • 2
    You should accept one of the answers below if they've helped you out. Personally, I have found both answers present as of writing to be quite helpful. – pattivacek Jul 09 '13 at 16:38

2 Answers2

10

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).

Marcin Deptuła
  • 11,789
  • 2
  • 33
  • 41
7

See this section of the documentation:

Porting Socket Applications to Winsock

Jason Kresowaty
  • 16,105
  • 9
  • 57
  • 84