I have an app that connects to a socket server on the internet. I use RSocket::RecvOneOrMore to read data from the network. the data is quite large so I keep calling this method. The pb is that how can I tell when the data transmission is finished?
Of course, we can add some end flag at server side. but the server is from 3rd party, we can not change the data definition there.
The server is originally designed for java client connection. In java, when we call InputStream.read(), it will return -1 if it meets the end of the stream.
And I used Wireshark to cap the log, no idea how can I detect the end of stream of a TCP connection.
Can anybody help me out here, many thx!