jacobsa / go-serial

A Go library for dealing with serial ports.
Apache License 2.0
631 stars 121 forks source link

Read() to buffer for specific time and then return #47

Open cmdpwnd opened 5 years ago

cmdpwnd commented 5 years ago

Currently Read() blocks until buf is full - or I don't understand the function correctly (honestly, let's hope so). I'm looking for a way to Read() to buf for say time.Second before Read() does return so that I can parse the data (if any) on hand rather than waiting for an infinite amount of time for a buffer to fill that might not.