sdl_ios icon indicating copy to clipboard operation
sdl_ios copied to clipboard

SDLProtocol message parsing

Open justinjdickow opened this issue 11 years ago • 1 comments

SDLProtocol.m

The current process is:

  1. Receive Bytes
  2. Check buffer for header length
  3. Process header
  4. Check buffer for message length
  5. Process message
  6. Remove header and message from buffer
  7. Route the message

Every time the full message is not in the buffer and bytes are received the header is re-parsed. A state machine should be used to parse the incoming bytes.

justinjdickow avatar Oct 29 '14 18:10 justinjdickow

A state machine is entire retooling of the packet deconstruction process. If we want to do this without a full retool (for now :smile:), we could also do this with some logic fixes.

joeljfischer avatar Oct 29 '14 18:10 joeljfischer