相关文章  
  • Linux操作系统编程之Shell问答录
  • 深入浅出分析Linux系统内核漏洞的问题(3)
  • Linux脚本开发数学库在PHP中的重要性(3)
  • Linux脚本开发数学库在PHP中的重要性(2)
  • 简述Linux操作系统文件搜索(下)
  • 用GNUprofiler提高代码运行速度 上
  • 用GNUprofiler提高代码运行速度 下
  • linux的域名解析系统设置
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    学习Linux网络编程之二4

    =main>  /* 监听sockfd描述符 */
      if(listen(sockfd,5)==-1)
      {
      fprintf(stderr,"Listen error:%sna",strerror(errno));
      exit(1);
      }

      while(1)
      {
      /* 服务器阻塞,直到客户程序建立连接 */
      sin_size=sizeof(struct sockaddr_in);
      if((new_fd=accept(sockfd,(struct sockaddr *)(&client_addr),&sin_size))==-1)
      {
      fprintf(stderr,"Accept error:%sna",strerror(errno));
      exit(1);
      }

      fprintf(stderr,"Server get c

    页码:[1] [2] [3] [4] [5]4页、共5页

         

          设为首页       |       加入收藏       |       广告服务       |       友情链接       |       版权申明      

    Copyriht 2007 - 2008 ©  科普之友 All right reserved