How to handle received data in the TCPClient ? (Delphi - Indy)

后端 未结 5 603
梦如初夏
梦如初夏 2021-02-01 22:59

When i send a message from TCPClient to a TCPServer it will be handled using OnExecute event in the server . Now i want to handle the rece

5条回答
  •  盖世英雄少女心
    2021-02-01 23:38

    TCP doesn't operate with messages. That is stream-based interface. Consequently don't expect that you will get a "message" on the receiver. Instead you read incoming data stream from the socket and parse it according to your high-level protocol.

提交回复
热议问题