< prev index next >

src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c

Print this page
rev 53271 : 8216981: Per thread IO statistics in JFR

*** 445,454 **** --- 445,456 ---- JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", "ICMP Port Unreachable"); } else { JNU_ThrowIOExceptionWithLastError(env, "sendto failed"); } + } else if (ret > 0) { + JVM_callNetworkWriteBytes(env, ret); } if (mallocedPacket) { free(fullPacket); }
*** 845,854 **** --- 847,860 ---- } } else { int port; jobject packetAddress; + if (n > 0) { + JVM_callNetworkReadBytes(env, n); + } + /* * success - fill in received address... * * REMIND: Fill in an int on the packet, and create inetadd * object in Java, as a performance improvement. Also
< prev index next >