最简单的方法打开和使用在C插座 [英] Simplest Way To Open and Use a Socket in C

查看:127
本文介绍了最简单的方法打开和使用在C插座的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始做一些基本的网络编程用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做套接字编程最好的教程是 Beej的指南网络编程。我建议你​​在开始时获得了很好的概述开始,但如果你只需要得到一些code工作的现在的,你可以跳到节标题为Client-Server背景

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插座的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆