开发者

Porting linux socket application to windows usins MsDev

开发者 https://www.devze.com 2022-12-11 21:09 出处:网络
Is there openly available headers which can be used to compile linux socket application(using socket/udp/ip headers). they should define s开发者_开发知识库tructures like sa_family_t,in_port_t

Is there openly available headers which can be used to compile linux socket application (using socket/udp/ip headers). they should define s开发者_开发知识库tructures like sa_family_t,in_port_t

Mandatory is to use Msdev and not cygwin/gcc or mingw compiler.


You can use the structures and functions declared in winsock.h or winsock2.h from the standard Win32 API. There are some differences from the standard BSD implementation, but for a simple socket-based application the port should be relatively straightforward.


As far as I know, there is no easy way to do this. Windows provides an entirely different set of system calls than linux, as well as a different method for handling sockets.

0

精彩评论

暂无评论...
验证码 换一张
取 消