Add connect() and disconnect() methods to DatagramSocketImpl so that
destination filtering can be done by the native OS instead of DatagramSocket.
The current implementation creates an InetAddress and calls peek for
every receive() on a connected socket. This is unnecessary if the OS
supports connected datagrams.
For unconnected datagrams, we can avoid the extra peek() call when there is
a security manager present if DatagramSocketImpl had receive method that
could return an address like peek does:
int receive(DatagramPacket p, InetAddress i);
###@###.### 2002-10-06
destination filtering can be done by the native OS instead of DatagramSocket.
The current implementation creates an InetAddress and calls peek for
every receive() on a connected socket. This is unnecessary if the OS
supports connected datagrams.
For unconnected datagrams, we can avoid the extra peek() call when there is
a security manager present if DatagramSocketImpl had receive method that
could return an address like peek does:
int receive(DatagramPacket p, InetAddress i);
###@###.### 2002-10-06
- duplicates
-
JDK-4433616 DatagramSocketImpl.connect should throw SocketException
-
- Resolved
-