-
Notifications
You must be signed in to change notification settings - Fork 452
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
cannot read a whole message #63
Comments
Me too, I have the same problem |
My two cents.....
IMHO, this approach to the reading is not correct. Like in TCP, you should
not relay on a bunch of bytes arriving all together just because they have
been sent together, because of fragmentation, when it comes to serial, you
should be prepared to received half (or part) of a message, and then the
rest, or many messages together. Even if in the case of a directly
connected serial-to-serial your expectations is correct, it is certainly
not when you for exemple, pass through some serial-over-ip device or SW. If
you try in any case to write SW not relying on "all message delivered at
once" the result will be more robust and reusable.
Paolo
…On Thu, Aug 24, 2017 at 8:36 AM, Robin3D ***@***.***> wrote:
Me too, I have the same problem
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#63 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/APDv1UfRLIueib7HDCGgV8lECvpS7Ekwks5sbRnSgaJpZM4O8-ik>
.
|
thanks for your opinion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
result of code above:
when receive "abcdef"
it will print
"a" and "bcdef"
always a single byte followed by reminded bytes.
what is the problem?
btw, I use windows 10 build1703, Go 1.8, VSPD 6.9(virtual serial port).
The text was updated successfully, but these errors were encountered: