]> sigrok.org Git - libsigrok.git/commit - src/hardware/beaglelogic/protocol.c
beaglelogic: Add beaglelogic_tcp_drain function
authorKumar Abhishek <redacted>
Sat, 23 Sep 2017 05:39:14 +0000 (11:09 +0530)
committerUwe Hermann <redacted>
Tue, 26 Sep 2017 16:14:46 +0000 (18:14 +0200)
commitf7d7ee82dd1d88af807d4d8376d04a39baa53490
tree870414ac846a89d893e9d50da93540a3f0d96bcb
parent9b2b3ef93e9821ffc9edc1c8bdd929c0143939dd
beaglelogic: Add beaglelogic_tcp_drain function

The function drains off all the remaining data in the receive socket
and is triggered before starting a capture and after a capture is
completed. In the absence of this function, there is a possibility of
data corruption and also the NodeJS TCP server throws an error if the
buffer is not completely read out before the socket is closed.

Signed-off-by: Kumar Abhishek <redacted>
src/hardware/beaglelogic/api.c
src/hardware/beaglelogic/beaglelogic.h
src/hardware/beaglelogic/beaglelogic_tcp.c
src/hardware/beaglelogic/protocol.c