Know of any cross platform socket library (windows & Linux) in C?

前端 未结 6 1094
自闭症患者
自闭症患者 2021-02-07 12:23

I am looking to do socket communications (listen, accept, connect, recv, send, disconnect) in both linux and windows. My project is in C, so unless someone can think of a way fo

6条回答
  •  甜味超标
    2021-02-07 13:13

    Off-hand, I can think of four libraries:

    • GLib Channels from the GLib framework can abstract socket usage, but you'll need platform-specific code for socket creation.

    • libuv is a platform abstraction layer for node.js and handles, among other things, sockets and async IO.

    • The Apache Portable Runtime also contains network routines.

    • The Netscape Portable Runtime does socket manipulation as well.

提交回复
热议问题