diff options
author | jfrijters <jfrijters> | 2008-06-13 13:00:47 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2008-06-13 13:00:47 +0400 |
commit | f0ec6a7e0d16e7cd941c051155ff6d804fecd1fc (patch) | |
tree | cf515a93adc5be657ec01bcc188fd46d852ee839 /openjdk/java/net | |
parent | 8b7b320f15a21a7fac1c68163c5481590fe8c8cc (diff) |
Integrated OpenJDK 6 b10.
Diffstat (limited to 'openjdk/java/net')
-rw-r--r-- | openjdk/java/net/DefaultDatagramSocketImplFactory.java | 33 | ||||
-rw-r--r-- | openjdk/java/net/PlainSocketImpl.java | 16 |
2 files changed, 49 insertions, 0 deletions
diff --git a/openjdk/java/net/DefaultDatagramSocketImplFactory.java b/openjdk/java/net/DefaultDatagramSocketImplFactory.java new file mode 100644 index 00000000..54bae661 --- /dev/null +++ b/openjdk/java/net/DefaultDatagramSocketImplFactory.java @@ -0,0 +1,33 @@ +/* + Copyright (C) 2008 Jeroen Frijters + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jeroen Frijters + jeroen@frijters.net + +*/ + +package java.net; + +class DefaultDatagramSocketImplFactory +{ + static DatagramSocketImpl createDatagramSocketImpl(boolean isMulticast) throws SocketException + { + return new PlainDatagramSocketImpl(); + } +} diff --git a/openjdk/java/net/PlainSocketImpl.java b/openjdk/java/net/PlainSocketImpl.java index 2c2c0975..01f41439 100644 --- a/openjdk/java/net/PlainSocketImpl.java +++ b/openjdk/java/net/PlainSocketImpl.java @@ -530,6 +530,22 @@ public class PlainSocketImpl extends SocketImpl } } + void setFileDescriptor(FileDescriptor fd) { + this.netSocket = fd.getSocket(); + } + + void setAddress(InetAddress address) { + this.address = address; + } + + void setPort(int port) { + this.port = port; + } + + void setLocalPort(int localPort) { + this.localport = localPort; + } + /** * Gets an InputStream for this socket. */ |