2003-01-10 Michael Koch <konqueror@gmx.de>

* java/net/DatagramSocket.java
	(ch): Description added.
	(remotePort): Initialize with -1.
	(connect): Doesnt throws SocketException.
	* java/net/MulticastSocket.java
	(setInterface): Merge with Classpath.
	* java/net/ServerSocket.java
	(closed): New member variable.
	(bind): Check if socket is closed.
	(close): Close an associated channel too, set new value to closed.
	(isBound): Reindented.
	(isClosed): Implemented.
	* java/net/Socket.java
	(closed): New member variable.
	(bind): Check if socket is closed.
	(connect): Check if socket is closed.
	(close): Close an associated channel too, set new value to closed.
	(isClosed): Implemented.

From-SVN: r61185
This commit is contained in:
Michael Koch 2003-01-11 01:17:19 +00:00 committed by Tom Tromey
parent b1771c6ac2
commit 927818a598
5 changed files with 70 additions and 13 deletions

View file

@ -1,5 +1,6 @@
/* MulticastSocket.java -- Class for using multicast sockets
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -163,13 +164,15 @@ public class MulticastSocket extends DatagramSocket
/**
* Sets the interface to use for sending multicast packets.
*
* @param inf The new interface to use
* @param addr The new interface to use.
*
* @exception SocketException If an error occurs
* @exception SocketException If an error occurs.
*
* @since 1.4
*/
public void setInterface(InetAddress inf) throws SocketException
public void setInterface(InetAddress addr) throws SocketException
{
impl.setOption(SocketOptions.IP_MULTICAST_IF, inf);
impl.setOption(SocketOptions.IP_MULTICAST_IF, addr);
}
/**