2003-09-25 Michael Koch <konqueror@gmx.de>
* gnu/java/net/PlainDatagramSocketImpl.java (finalize): Moved to directly after constructor. (getNativeFD): New method. * gnu/java/net/PlainSocketImpl.java (getNativeFD): New method. From-SVN: r71792
This commit is contained in:
committed by
Michael Koch
parent
9481d818d9
commit
bf172f5467
@@ -112,6 +112,21 @@ public final class PlainDatagramSocketImpl extends DatagramSocketImpl
|
||||
{
|
||||
}
|
||||
|
||||
protected void finalize() throws Throwable
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (fnum != -1)
|
||||
close();
|
||||
}
|
||||
super.finalize();
|
||||
}
|
||||
|
||||
public int getNativeFD()
|
||||
{
|
||||
return fnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Binds this socket to a particular port and interface
|
||||
*
|
||||
@@ -267,14 +282,4 @@ public final class PlainDatagramSocketImpl extends DatagramSocketImpl
|
||||
{
|
||||
mcastGrp(((InetSocketAddress)mcastaddr).getAddress(), netIf, false);
|
||||
}
|
||||
|
||||
protected void finalize() throws Throwable
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (fnum != -1)
|
||||
close();
|
||||
}
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,6 +142,11 @@ public final class PlainSocketImpl extends SocketImpl
|
||||
super.finalize();
|
||||
}
|
||||
|
||||
public int getNativeFD()
|
||||
{
|
||||
return fnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the specified option on a socket to the passed in object. For
|
||||
* options that take an integer argument, the passed in object is an
|
||||
|
||||
Reference in New Issue
Block a user