TCP Client Connection

前端 未结 3 773
小鲜肉
小鲜肉 2021-01-05 08:25

I have an application that I have written for my application distributed throughout the company to send data to me through our Windows 2003 server (running IIS 6.0). Small t

3条回答
  •  鱼传尺愫
    2021-01-05 09:03

    You should precede the sent content with the length of that content. Your loop assumes that all of the data is sent before the loop executes, when in reality your loop is executing as the data is sent. There will be times when there is no data waiting on the wire, so the loop terminates; meanwhile, content is still being sent across the wire. That's why your loop is only running once.

提交回复
热议问题