如何编写socket TCP / IP程序 [英] how to write socket TCP/IP program

查看:85
本文介绍了如何编写socket TCP / IP程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个套接字程序。在该程序中,服务器执行常规任务。只有客户端向服务器发送消息,该服务器才接受该临时消息然后将继续执行常规任务.pls帮助我如何编写套接字TCP / IP程序使用c。

I want to write a socket program .In that program, server perform regular tasks .Only if client send message to server , that server accept that interim message and then will continue regular tasks .pls help me how to write socket TCP/IP program using c.

推荐答案

hi,

所以你想用C语言做一些网络编程。我希望你已经习惯了编程在C语言环境中可以获得很多帮助。



a关于CP的文章非常好:网络和套接字编程教程 [ ^ ]



a working代码示例此处 [ ^ ]



涵盖此主题的Youtube视频也是可用。



对于winsock(Windows上的套接字),您可以参考:

1)。 quick winsock教程 [ ^ ]

2)。当然 MSDN [ ^ ]

你将不得不进一步深入了解这些链接。



希望这有帮助!!

So you want to do some network programming in C. I hope you are already comfortable programming in C. Plenty of help is available for Linux environment.

a very well written article here on CP :Networking and Socket programming tutorial in C[^]

a working code sample here[^]

Youtube videos covering this topic are also available.

For winsock (sockets on windows) you can refer :
1). quick winsock tutorial[^]
2). ofcourse MSDN[^]
you will have to further dig into these links.

hope this helps !!


这篇关于如何编写socket TCP / IP程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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