How to open and use a socket in C?

前端 未结 8 2064
生来不讨喜
生来不讨喜 2020-12-13 21:19

I would like to know the simplest and most effective way to open and write data to a socket in the C programming language for network programming.

8条回答
  •  时光取名叫无心
    2020-12-13 21:59

    Much good advice here so far. I generally write in C++, but you can find some use in a white paper I wrote "How to Avoid the Top Ten Sockets Programming Errors" - ignore the advice to use the ACE toolkit (since it requires C++) but take note of the socket errors in the paper - they're easy to make and hard to find, especially for a beginner. http://www.riverace.com/sockets10.htm

提交回复
热议问题