Handling dropped TCP packets in C#

前端 未结 4 1025
执笔经年
执笔经年 2020-12-15 12:44

I\'m sending a large amount of data in one go between a client and server written C#. It works fine when I run the client and server on my local machine but when I put the

4条回答
  •  隐瞒了意图╮
    2020-12-15 13:24

    It's definitely not TCP's fault. TCP guarantees in-order, exactly-once delivery.

    Which strings are "missing"? I'd wager it's the last ones; try flushing from the sending end.

    Moreover, your "protocol" here (I'm taking about the application-layer protocol you're inventing) is lacking: you should consider sending the # of objects and/or their length so the receiver knows when he's actually done receiving them.

提交回复
热议问题