what to specify for END-OF-DATA characters/string
-
I've created a clients/server app in which multiple clients share data (text/binary) with the server.
Are their any character/string pattern I can use to specify "end of data" characters so that the server knows that clientX data is finished (i don't want to close a connection).I'm using QT (C++)
-
I've created a clients/server app in which multiple clients share data (text/binary) with the server.
Are their any character/string pattern I can use to specify "end of data" characters so that the server knows that clientX data is finished (i don't want to close a connection).I'm using QT (C++)
-
Although I can use Null or Length count but these bytes can be part of data (e.g. in binary form).
-
Although I can use Null or Length count but these bytes can be part of data (e.g. in binary form).
@pingal said in what to specify for END-OF-DATA characters/string:
Although I can use Null or Length count but these bytes can be part of data (e.g. in binary form).
So if it is arbitrary binary date make your protocol so it always starts with a 1, 2 or 4 byte "count" header, as required for your maximum length, and you are good to go. @J-Hilk suggests such a protocol, with some extra checking at the end if desired.