src/share/classes/java/net/DatagramSocket.java

Print this page

        

*** 102,112 **** int connectedPort = -1; /** * Connects this socket to a remote socket address (IP address + port number). * Binds socket if not already bound. ! * <p> * @param address The remote address. * @param port The remote port * @throws SocketException if binding the socket fails. */ private synchronized void connectInternal(InetAddress address, int port) throws SocketException { --- 102,112 ---- int connectedPort = -1; /** * Connects this socket to a remote socket address (IP address + port number). * Binds socket if not already bound. ! * * @param address The remote address. * @param port The remote port * @throws SocketException if binding the socket fails. */ private synchronized void connectInternal(InetAddress address, int port) throws SocketException {
*** 336,346 **** /** * Binds this DatagramSocket to a specific address and port. * <p> * If the address is {@code null}, then the system will pick up * an ephemeral port and a valid local address to bind the socket. ! *<p> * @param addr The address and port to bind to. * @throws SocketException if any error happens during the bind, or if the * socket is already bound. * @throws SecurityException if a security manager exists and its * {@code checkListen} method doesn't allow the operation. --- 336,346 ---- /** * Binds this DatagramSocket to a specific address and port. * <p> * If the address is {@code null}, then the system will pick up * an ephemeral port and a valid local address to bind the socket. ! * * @param addr The address and port to bind to. * @throws SocketException if any error happens during the bind, or if the * socket is already bound. * @throws SecurityException if a security manager exists and its * {@code checkListen} method doesn't allow the operation.
*** 1238,1251 **** * @param fac the desired factory. * @exception IOException if an I/O error occurs when setting the * datagram socket factory. * @exception SocketException if the factory is already defined. * @exception SecurityException if a security manager exists and its ! * {@code checkSetFactory} method doesn't allow the ! operation. ! * @see ! java.net.DatagramSocketImplFactory#createDatagramSocketImpl() * @see SecurityManager#checkSetFactory * @since 1.3 */ public static synchronized void setDatagramSocketImplFactory(DatagramSocketImplFactory fac) --- 1238,1249 ---- * @param fac the desired factory. * @exception IOException if an I/O error occurs when setting the * datagram socket factory. * @exception SocketException if the factory is already defined. * @exception SecurityException if a security manager exists and its ! * {@code checkSetFactory} method doesn't allow the operation. ! * @see java.net.DatagramSocketImplFactory#createDatagramSocketImpl() * @see SecurityManager#checkSetFactory * @since 1.3 */ public static synchronized void setDatagramSocketImplFactory(DatagramSocketImplFactory fac)