<div dir="ltr">Hello, I'd like to understand why a disconnected DatagramChannel does not support direct buffers derived from MemorySegments created from shared Arenas.<div><br></div><div>The connected code path uses IOUtil, which obtains the address via JavaNioAccess and the disconnected one obtains the address via ((sun.nio.ch.DirectBuffer)bb).address(), which undergoes MemorySession validation semantics. </div><div><br></div><div>Example:</div><div><br></div><div>----</div><div>  var buffer = Arena.ofShared().allocate(1024).asByteBuffer().putInt(42).flip();</div><div><br></div><div>  var dc = DatagramChannel.open();<br>  dc.bind(new InetSocketAddress(10000));<br>  dc.join(InetAddress.getByName("225.0.0.0"), NetworkInterface.getByInetAddress(InetAddress.getLoopbackAddress()));<br></div><div><br></div><div>  // works</div><div>  dc.connect(new InetSocketAddress("225.0.0.0", 1024));<br>  dc.write(buffer);<br>  dc.disconnect();<br></div><div><br></div><div>  // UnsupportedOperationException<br>  dc.send(buffer.rewind(), new InetSocketAddress("225.0.0.0", 1024));<br></div><div>----</div><div><br></div><div>Regards</div><div><br></div></div>