6963907: (so) Socket adapter need to implement sendUrgentData

Alan Bateman Alan.Bateman at oracle.com
Mon Jul 19 07:00:33 PDT 2010


Some limited support for sending out of band/TCP urgent data was added 
in jdk1.4 to java.net.Socket. This was never implemented by 
SocketChannel's socket adapter but as TCP urgent data isn't used by many 
protocols, it just hasn't been a problem. It turns out that at least two 
SQL protocols do use TCP urgent data and JDBC drivers using NIO do need 
this implemented. I've put the webrev here:
  http://cr.openjdk.java.net/~alanb/6963907/webrev

The main thing is that sendUrgentData is only usable when the socket 
channel is configured blocking as it cannot complete successfully having 
written zero bytes (throwing IllegalBlockingModeException is consistent 
with other socket adapter methods).

-Alan.



More information about the nio-dev mailing list