Maybe it is deliberate, but requestFrom in wire wrapper always returns requested number of bytes, regardless of did it actualy receive them or not.
It seems to me that error atribute, or localerror variable could be used to check if anything at all is connected, if it is, start reading, and then depending on that return zero or received numbr of bytes.
Hi!
Maybe it is deliberate, but requestFrom in wire wrapper always returns requested number of bytes, regardless of did it actualy receive them or not.
It seems to me that error atribute, or localerror variable could be used to check if anything at all is connected, if it is, start reading, and then depending on that return zero or received numbr of bytes.