mirror of https://github.com/rusefi/rusefi-1.git
proxy progress
This commit is contained in:
parent
565462cf80
commit
d842049b6f
|
@ -141,12 +141,18 @@ public class IncomingDataBuffer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte readByte() throws EOFException {
|
public byte readByte() throws EOFException, InterruptedException {
|
||||||
|
boolean timeout = waitForBytes("readByte", System.currentTimeMillis(), 1);
|
||||||
|
if (timeout)
|
||||||
|
throw new IllegalStateException("Timeout in readByte");
|
||||||
return (byte) getByte();
|
return (byte) getByte();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int readInt() throws EOFException {
|
public int readInt() throws EOFException, InterruptedException {
|
||||||
return getInt();
|
boolean timeout = waitForBytes("readInt", System.currentTimeMillis(), 4);
|
||||||
|
if (timeout)
|
||||||
|
throw new IllegalStateException("Timeout in readByte");
|
||||||
|
return swap32(getInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int read(byte[] packet) throws InterruptedException {
|
public int read(byte[] packet) throws InterruptedException {
|
||||||
|
|
Loading…
Reference in New Issue