本文介绍了Crossplatform替代Winsock?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我基本上是在寻找一个跨平台的方式来做基本的事情,如接受连接和发送和接收数据。
I basically am looking for a cross platform way to do basic things such as accept connections and send and receive data. What library would work in Linux, Windows and Mac?
感谢
推荐答案
p> Winsock基于BSD套接字API,它在Linux和OS X上都是原生支持的(即 socket()
, connect
, accept()
, send()
, recv )
, select()
等)。
Winsock is based on the BSD sockets API, which is natively supported on both Linux and OS X (ie. socket()
, connect()
, accept()
, send()
, recv()
, select()
and so forth).
但是他们是这样的,通常更容易从Winsock到真正的BSD套接字比反向。
There are some differences, but they are such that it's usually easier to port from Winsock to true BSD sockets than the reverse.
这篇关于Crossplatform替代Winsock?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!