Porting Winsock to Linux Sockets

前端 未结 4 938
盖世英雄少女心
盖世英雄少女心 2021-01-11 15:56

I have a program that does some networking using Winsock, and one of our requirements right now is to port over our program to Linux. The only thing stopping us from doing t

4条回答
  •  情书的邮戳
    2021-01-11 16:52

    It will depend if you use any windows specific networking functionality or if you're just using mostly the mostly BSD compatible API.

    So, if you're using overlapped I/O and I/O completion ports and other advanced parts of the Winsock API then things will be very difficult to port and if you're just using the BSD compatible stuff then it should be easy to write a thin translation layer or even just have the winsock startup and shutdown stuff inside a windows specific ifdef...

    This may help: http://tangentsoft.net/wskfaq/articles/bsd-compatibility.html

提交回复
热议问题