< prev index next >

src/java.base/share/classes/java/net/ServerSocket.java

Print this page

        

*** 44,53 **** --- 44,82 ---- * of the {@code SocketImpl} class. An application can * change the socket factory that creates the socket * implementation to configure itself to create sockets * appropriate to the local firewall. * + * <p> The {@code ServerSocket} class offers some convenience methods + * (such as {@link #setReuseAddress(boolean) setReuseAddress}) + * to get and set some commonly used options. However, socket options + * can be more generally configured using the + * {@link #setOption(SocketOption, Object) setOption} method. + * A {@code ServerSocket} supports the following options: + * <blockquote> + * <table class="striped"> + * <caption style="display:none">Socket options</caption> + * <thead> + * <tr> + * <th scope="col">Option Name</th> + * <th scope="col">Description</th> + * </tr> + * </thead> + * <tbody> + * <tr> + * <th scope="row"> {@link java.net.StandardSocketOptions#SO_RCVBUF SO_RCVBUF} </th> + * <td> The size of the socket receive buffer </td> + * </tr> + * <tr> + * <th scope="row"> {@link java.net.StandardSocketOptions#SO_REUSEADDR SO_REUSEADDR} </th> + * <td> Re-use address </td> + * </tr> + * </tbody> + * </table> + * </blockquote> + * Additional (implementation specific) options may also be supported. + * * @author unascribed * @see java.net.SocketImpl * @see java.net.ServerSocket#setSocketFactory(java.net.SocketImplFactory) * @see java.nio.channels.ServerSocketChannel * @since 1.0
< prev index next >