-
Notifications
You must be signed in to change notification settings - Fork 96
Add packet transfer protocol #188
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
base: master
Are you sure you want to change the base?
Conversation
Looks good so far! I think given EventEmitter isn't on browser it might be worth adding I guess the input data handler would ideally be its own function rather than buried inside Right now we don't remove XON/XOFF chars from the input stream, but I think we'd probably want to do that now (as we need to be able to remove the packet ACK/NAK anyway) - and to reliably receive binary data I think we need to ignore XON/XOFF when in the middle of receiving a binary packet. |
Yeah missing the events stuff was catching me out, and by first stab at writing the packet parsing I did using The ACK/NACK does that come right after the write, so there's no control chars or anything as a preamble? Just that window of within a second after a write expect a 6 or 21 char? Another thing I wasn't sure on after reading more about the protocol (and I've not dug too much into the C code yet), with something like a |
Yeah, it's a pain not being able to rely on certain things being built in (
Correct, yes.
There's just a limitiation of response size (it's just one packet). Not ideal, but it's simple. One thing to note is the response is produced by |
Will keep this open as a WIP and add to it as I work things out to make sure I don't end up too far down a wrong path.
Fixes #187