socket
将来这两个程序还可以搞分布式

解决方案 »

  1.   

    named pipe applies better in your case.
      

  2.   

    同意楼上的,根据你的情况,用named pipe是最佳选择。
      

  3.   

    我还是比较推荐socket,命名管道要求两个程序共享资源,从某种意义讲,其模块间耦合度高。而socket则逻辑上彼此无关,是一种弱耦合(协议耦合)的方式再说,某天你想把程序放两台机器上,只要改配置文件即可,命名管道严重限制你的scalability
      

  4.   

    pipe唯一的好处是实现相对简单
      

  5.   

    the features pipe have:
    ============================================
    Multithreaded pipe server 
    Named pipe server using overlapped I/O 
    Named pipe server using completion routines 
    Named pipe client 
    Transactions on named pipes check sdk for detail
      

  6.   

    filemapping是最难控制的。
    socket耦合度最低,而named pipe则耦合度很高
    至于速度,一般来说,在同一台电脑上,socket的速度页足够高
      

  7.   

    to upstairs:耦合度高低
    ===========================================
    it depends on how u program the code that process data buffer, and
    it has nothing to do with pipe/socket.
    速度
    ===========================================
    they all suffice for normal case.  we can ignore it.filemapping
    ===========================================
    on the contrary, i think it's the easiest one to be implemented.
      

  8.   

    一般来说,如果是两个程序那么SOCKET比较通用
      

  9.   

    还是觉得SOCKET 好~
    方便以后做分布~
      

  10.   

    虽然命名管道也可以,但是SOCKET是比较通用的解决方案,可以适用各种情形