问题描述
我刚刚开始做一些基本的网络编程用C,我发现关于套接字的所有这些事情,他们都显得很费解。也许打开插座用C只是令人费解本身,但我想知道开和写入数据的C语言编程插座最简单,最有效的方式。
I'm just starting out doing some basic network programming with C, and I found all these things about sockets and they all seem very convoluted. Maybe opening sockets with C is just convoluted itself, but I would like to know the simplest and most effective way to open and write data to a socket in the C programming language.
感谢
推荐答案
您说得对,在C使用套接字有困难的语法。像Java和Python语言后,使其通过比较一个单元。我发现在C做套接字编程最好的教程是。
You're right, using sockets in C has a difficult syntax. Later languages like Java and Python make it a snap by comparison. The best tutorial I've found for doing socket programming in C is Beej's Guide to Network Programming. I recommend you start at the beginning to get a good overview, but if you just need to get some code working now, you can skip ahead to the section titled Client-Server Background.
祝你好运!
这篇关于最简单的方法打开和使用在C插座的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!