Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDLProtocol message parsing should use a state machine #17

Closed
justinjdickow opened this issue Oct 29, 2014 · 1 comment · Fixed by #2100
Closed

SDLProtocol message parsing should use a state machine #17

justinjdickow opened this issue Oct 29, 2014 · 1 comment · Fixed by #2100
Labels
bug A defect in the library protocol Relating to the protocol layer
Milestone

Comments

@justinjdickow
Copy link
Contributor

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.

@joeljfischer
Copy link
Contributor

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

@joeljfischer joeljfischer added the proposal Accepted SDL Evolution Proposal label Jul 31, 2015
@joeljfischer joeljfischer added this to the Future milestone Jul 31, 2015
@joeljfischer joeljfischer removed the proposal Accepted SDL Evolution Proposal label Mar 9, 2017
davidswi pushed a commit to davidswi/sdl_ios that referenced this issue May 18, 2017
…L-872 to master

* commit '9f8a41887e403a9d7fcd8e7bfa433b353896a7a3':
  Remove canceledSema from session.
@joeljfischer joeljfischer added bug A defect in the library and removed enhancement labels May 24, 2018
@joeljfischer joeljfischer modified the milestones: Future, 6.1.0 May 24, 2018
@joeljfischer joeljfischer modified the milestones: 6.1.0, Future Aug 20, 2018
@joeljfischer joeljfischer added the protocol Relating to the protocol layer label Jan 28, 2020
joeljfischer added a commit that referenced this issue Aug 24, 2022
@joeljfischer joeljfischer changed the title SDLProtocol message parsing SDLProtocol message parsing should use a state machine Sep 23, 2022
@joeljfischer joeljfischer mentioned this issue Sep 23, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library protocol Relating to the protocol layer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants