文件名称:network
- 所属分类:
- Internet/网络编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2014-12-10
- 文件大小:
- 8kb
- 下载次数:
- 0次
- 提 供 者:
- che***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
程序为网络程序,应使用socket编程,服务器要实现对每一个访问的客户机发送一个欢迎消息,可选用select()函数实现I/O多路复用,服务器通过socket相关函数来建立TCP连接,监听每一个访问的客户端,当有客户端向服务器发起连接时,将客户端文件描述符加入监听描述符集,客户端向服务器发送信息,同时也收到服务器发来的”Hello,Welcome Client!”。
本题需要写两个程序,分别是“server.c”和“client.c”。前者主要是在服务器端执行并等待客户端访问操作然后发欢迎信息,后者主要是向主机发送访问命令并接收服务器发来的欢迎信息。-Procedures for network programs, you should use socket programming, server to achieve for each visit to a client sends a welcome message, the choice of () function to achieve I/O multiplexers, server through socket correlation function to establish a TCP connection, monitor each client visit, when a client initiates a connection to the server, the client file descr iptor join listening descr iptor set, the client sends a message to the server, and also received a server sent Hello, Welcome Client !.
That the need to write two programs, namely server.c and client.c . The former is mainly d and waiting for clients to access operations and then send a welcome message on the server side, which is mainly access to the host sends commands and receives the welcome message sent the server.
本题需要写两个程序,分别是“server.c”和“client.c”。前者主要是在服务器端执行并等待客户端访问操作然后发欢迎信息,后者主要是向主机发送访问命令并接收服务器发来的欢迎信息。-Procedures for network programs, you should use socket programming, server to achieve for each visit to a client sends a welcome message, the choice of () function to achieve I/O multiplexers, server through socket correlation function to establish a TCP connection, monitor each client visit, when a client initiates a connection to the server, the client file descr iptor join listening descr iptor set, the client sends a message to the server, and also received a server sent Hello, Welcome Client !.
That the need to write two programs, namely server.c and client.c . The former is mainly d and waiting for clients to access operations and then send a welcome message on the server side, which is mainly access to the host sends commands and receives the welcome message sent the server.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
network\10-2-2\getaddrinfo.c
.......\......\Makefile
.......\.....3\client.c
.......\......\Makefile
.......\......\server.c
.......\...3-1\Makefile
.......\......\net_fcntl.c
.......\.....2\client.c
.......\......\Makefile
.......\......\net_select.c
.......\...5-3\Makefile
.......\......\ntp.c
.......\10-2-2
.......\10-2-3
.......\10-3-1
.......\10-3-2
.......\10-5-3
network