The JDK 1.1 release made three categories of enhancements to sockets:In addition, many bugs were fixed.
- The Socket and ServerSocket classes are now extendable, non-final classes.
- New methods were added to support BSD-style options.
- New subclasses of SocketException were added to allow for finer granularity of network exception handling.
Two constructors in theSocket
class were deprecated. These constructors allowed programmers to create a DatagramSocket. Now programmers should explicitly construct a DatagramSocket if they want one.
Deprecated Methods Alternatives Socket(InetAddress,int,boolean)
One of DatagramSocket's three constructors
Socket(String,int,boolean)
One of DatagramSocket's three constructors
New Methods
These constructors and methods were added to the indicated classes for the JDK 1.1. Note: The information in parenthesis indicates which category of enhancement the change was required for.For details, see Networking EnhancementsServerSocket: ServerSocket(int, int, InetAddress) (bug fixes) implAccept (1) getSoTimeout (2) setSoTimeout (2) Socket: Socket() (1) Socket(SocketImpl) (1) Socket(InetAddress, int, InetAddress, int) (bug fixes) Socket(String, int, InetAddress, int) (bug fixes) getLocalAddress (bug fixes) getSoLinger (2) getSoTimeout (2) getTcpNoDelay (2) setSoLinger (2) setSoTimeout (2) setTcpNoDelay (2) SocketImpl: getOption (2) setOption (2)