实验二、TCP服务客户程序设计.docVIP

  • 1
  • 0
  • 约3.39千字
  • 约 4页
  • 2018-02-16 发布于河南
  • 举报
实验二、TCP服务客户程序设计

实验一、TCP客户端程序设计 一、实验目的 1、学习Linux操作系统的基本命令用法。 2、掌握编写TCP客户端程序的基本方法; 3、分析服务器程序和客户端程序配合运行的结果。 二、实验内容 2.3 TCP客户端程序设计 1、请在emacs文本编辑器中编写下列程序。 /*************************************************************************** * 文件名: TCPServer.c * ***************************************************************************/ #include stdio.h #include stdlib.h #include string.h #include unistd.h #include sys/types.h #include sys/socket.h #include netinet/in.h #include arpa/inet.h #include Practical.h int main(int argc, char *argv[]) { if (argc 3 || argc 4) // 测试命令行参数是否正确 DieWithUserMessage(Parameter(s)

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档