You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// "If there are fewer bytes remaining in the buffer
65
65
// than are required to hold the datagram
66
66
// then the remainder of the datagram is silently discarded."
67
67
if (underlyingChannel.isConnected()) {
68
-
underlyingChannel.read(buffer);
68
+
underlyingChannel.read(recvBuffer);
69
69
} else {
70
-
underlyingChannel.receive(buffer);
70
+
underlyingChannel.receive(recvBuffer);
71
71
}
72
72
// final int readBytes = buffer.position();
73
73
// if (readBytes == buffer.capacity()) {
74
74
// // TODO In this case it is very likely that the buffer was actually too small, and the remainder of the datagram/packet was silently discarded. We might want to give a warning, like throw an exception in this case, but whether this happens should probably be user configurable.
75
75
// }
76
-
buffer.flip();
77
-
if (buffer.limit() == 0) {
78
-
thrownewOSCParseException("Received a packet without any data", buffer);
76
+
recvBuffer.flip();
77
+
if (recvBuffer.limit() == 0) {
78
+
thrownewOSCParseException("Received a packet without any data", recvBuffer);
0 commit comments