xdlailai
V2EX  ›  问与答

c#客户端与服务器通信,用什么协议好?

  •  
  •   xdlailai · Apr 7, 2020 · 1763 views
    This topic created in 2247 days ago, the information mentioned may be changed or developed.
    之前都是用 socket 自己封装的协议,感觉不灵活,想改为基于 http 的协议,有啥好建议吗?主要用于传文件及一些简单的交互。
    6 replies    2020-04-08 11:02:19 +08:00
    opengps
        1
    opengps  
       Apr 7, 2020 via Android
    只要交互,那么 socket 的事件触发是最好的
    如果能忍受延迟,那么回到相对臃肿的 http 层用轮训
    visitant
        2
    visitant  
       Apr 7, 2020
    C#好像有一套原生的 rpc 实现?
    Mithril
        3
    Mithril  
       Apr 8, 2020   ❤️ 2
    直接上 SignalR 就完了,顺便推送都有了。
    noreplay
        4
    noreplay  
       Apr 8, 2020 via Android
    Netmq?
    zhujinliang
        5
    zhujinliang  
       Apr 8, 2020 via iPhone
    websocket
    thfurior
        6
    thfurior  
       Apr 8, 2020
    websocket,官方支持的很好
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3371 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 11:18 · PVG 19:18 · LAX 04:18 · JFK 07:18
    ♥ Do have faith in what you're doing.