equal
deleted
inserted
replaced
332 createImpl(); |
332 createImpl(); |
333 return impl; |
333 return impl; |
334 } |
334 } |
335 |
335 |
336 /** |
336 /** |
337 * Binds this DatagramSocket to a specific address & port. |
337 * Binds this DatagramSocket to a specific address and port. |
338 * <p> |
338 * <p> |
339 * If the address is <code>null</code>, then the system will pick up |
339 * If the address is <code>null</code>, then the system will pick up |
340 * an ephemeral port and a valid local address to bind the socket. |
340 * an ephemeral port and a valid local address to bind the socket. |
341 *<p> |
341 *<p> |
342 * @param addr The address & port to bind to. |
342 * @param addr The address and port to bind to. |
343 * @throws SocketException if any error happens during the bind, or if the |
343 * @throws SocketException if any error happens during the bind, or if the |
344 * socket is already bound. |
344 * socket is already bound. |
345 * @throws SecurityException if a security manager exists and its |
345 * @throws SecurityException if a security manager exists and its |
346 * <code>checkListen</code> method doesn't allow the operation. |
346 * <code>checkListen</code> method doesn't allow the operation. |
347 * @throws IllegalArgumentException if addr is a SocketAddress subclass |
347 * @throws IllegalArgumentException if addr is a SocketAddress subclass |
842 * a call to receive() for this DatagramSocket |
842 * a call to receive() for this DatagramSocket |
843 * will block for only this amount of time. If the timeout expires, |
843 * will block for only this amount of time. If the timeout expires, |
844 * a <B>java.net.SocketTimeoutException</B> is raised, though the |
844 * a <B>java.net.SocketTimeoutException</B> is raised, though the |
845 * DatagramSocket is still valid. The option <B>must</B> be enabled |
845 * DatagramSocket is still valid. The option <B>must</B> be enabled |
846 * prior to entering the blocking operation to have effect. The |
846 * prior to entering the blocking operation to have effect. The |
847 * timeout must be > 0. |
847 * timeout must be {@code > 0}. |
848 * A timeout of zero is interpreted as an infinite timeout. |
848 * A timeout of zero is interpreted as an infinite timeout. |
849 * |
849 * |
850 * @param timeout the specified timeout in milliseconds. |
850 * @param timeout the specified timeout in milliseconds. |
851 * @throws SocketException if there is an error in the underlying protocol, such as an UDP error. |
851 * @throws SocketException if there is an error in the underlying protocol, such as an UDP error. |
852 * @since JDK1.1 |
852 * @since JDK1.1 |
1099 * Sets traffic class or type-of-service octet in the IP |
1099 * Sets traffic class or type-of-service octet in the IP |
1100 * datagram header for datagrams sent from this DatagramSocket. |
1100 * datagram header for datagrams sent from this DatagramSocket. |
1101 * As the underlying network implementation may ignore this |
1101 * As the underlying network implementation may ignore this |
1102 * value applications should consider it a hint. |
1102 * value applications should consider it a hint. |
1103 * |
1103 * |
1104 * <P> The tc <B>must</B> be in the range <code> 0 <= tc <= |
1104 * <P> The tc <B>must</B> be in the range {@code 0 <= tc <= |
1105 * 255</code> or an IllegalArgumentException will be thrown. |
1105 * 255} or an IllegalArgumentException will be thrown. |
1106 * <p>Notes: |
1106 * <p>Notes: |
1107 * <p>For Internet Protocol v4 the value consists of an |
1107 * <p>For Internet Protocol v4 the value consists of an |
1108 * <code>integer</code>, the least significant 8 bits of which |
1108 * <code>integer</code>, the least significant 8 bits of which |
1109 * represent the value of the TOS octet in IP packets sent by |
1109 * represent the value of the TOS octet in IP packets sent by |
1110 * the socket. |
1110 * the socket. |