Hello,
I hope this is the correct forum to ask this...
I'm working on a client-server architecture application that relies on the TCP/IP protocol for transmitting data between the client and server application.
I've made my own protocol for the application that relies on the following structure:
@VT: <type> <size> [binary block]#
- Each message starts with @VT:
- type is an integer, identifying the type
- size is the length of the binary block
- binary block contains type specific data
- each message ends with #
Currently we're having discussions here whether or not to fully parse incoming data. Since I'm working with TCP, I assume that when I receive data on the incoming socket (C#.NET Sockets), the data contained in the socket is a complete message, meaning it starts with @VT: and ends with #.
Colleagues of mine say I need to parse the buffer everytime to search for an @ symbol and then parse the remaining data.
who is right?
I hope this is the correct forum to ask this...
I'm working on a client-server architecture application that relies on the TCP/IP protocol for transmitting data between the client and server application.
I've made my own protocol for the application that relies on the following structure:
@VT: <type> <size> [binary block]#
- Each message starts with @VT:
- type is an integer, identifying the type
- size is the length of the binary block
- binary block contains type specific data
- each message ends with #
Currently we're having discussions here whether or not to fully parse incoming data. Since I'm working with TCP, I assume that when I receive data on the incoming socket (C#.NET Sockets), the data contained in the socket is a complete message, meaning it starts with @VT: and ends with #.
Colleagues of mine say I need to parse the buffer everytime to search for an @ symbol and then parse the remaining data.
who is right?
Comment