If I have an event handler defined as such;
How does it handle multiple bytes?Code:Private Sub Data_Received(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles sp.DataReceived end sub
Say I receive a packet of 10 bytes, Will this event trigger on each byte? or is there a buffer that must be filled for this to trigger? or can I read all incoming bytes while in the sub?
if i have the following code inside the sub...
or would it depend on the time between the received bytes?Code:While ((sp.BytesToRead <> 0)) packet(i) i += 1 end while




Reply With Quote