相关文章  
  • 非常详细的 XLink1.0 学习笔记
  • 非windows操作系统与windows简易整合(2)
  • 非windows操作系统与windows简易整合(3)
  • Longhorn(长角)系统的初步优化
  • 彻底探索计算机变慢10大原因
  • 高级Windows 2000 Rootkit检测技术
  • 虚拟主机探虚实
  • “Windows优化大师”应用三忌
  • 20例Windows XP操作系统优化技巧
  • 高效的数据仓库管理设计以及所需注意事项
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    使用C#进行点对点通讯和文件传输7

    >  
           {
      
                Socket s = null ;
      
             try
      
             {
      
                s = CommunClass.ConnectToServer(Host,Port) ;
      
                CommunClass.WriteCommandToSocket(s,"EXECUTEFILE") ;
      
                CommunClass.WriteCommandDescToSocket(s,FileName) ;
      
                CommunClass.WriteDynamicTextToSocket(s,"",null) ;
      
                MessageBox.Show(CommunClass.ReadDynamicTextFromSocket(s)) ;
      
             }
      
             catch (Exception e)
      
             {
      
                MessageBox.Show(e.Message) ;
      
             }
      
             finally
      
             {
      
                if (s != null)
      
                  s.Close() ;
      
             }
      
           }
      
         }
      
      下面是服务器端

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

         

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

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