Where do I get arpa/inet.h?

后端 未结 2 1426
失恋的感觉
失恋的感觉 2021-01-04 00:23

Question is really simple. I need a tool to convert char* to ip adress and use it in

sockaddr_in.s_addr

arpa/inet.h has

相关标签:
2条回答
  • 2021-01-04 00:34

    Win32 provides its own implementation of the sockets API (Winsock) which uses slightly different headers.

    From the MSDN for inet_addr:

    Header Winsock2.h

    0 讨论(0)
  • 2021-01-04 00:37

    arpa/inet.h is the include used on Unix-like systems.

    On Windows, you must use winsock2.h.

    Example from the MSDN.

    0 讨论(0)
提交回复
热议问题