diff options
author | Michael Koch <konqueror@gmx.de> | 2002-09-10 18:02:02 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2002-09-10 18:02:02 +0000 |
commit | a886956a40a502e3b7ae25e6b79195985c30a1bf (patch) | |
tree | efa74de037bafc64f9022b0f9ef627af5465a3cb /libjava/java/net/SocketImpl.java | |
parent | bfae804050ac712d29b556ea0cd1f6e06199ae12 (diff) | |
download | gcc-a886956a40a502e3b7ae25e6b79195985c30a1bf.zip gcc-a886956a40a502e3b7ae25e6b79195985c30a1bf.tar.gz gcc-a886956a40a502e3b7ae25e6b79195985c30a1bf.tar.bz2 |
2002-09-10 Michael Koch <konqueror@gmx.de>
* java/net/SocketImpl.java
(connect): New method.
(supportsUrgentData): New method.
(sendUrgentData): New method.
* java/net/PlainSocketImpl.java
(connect): One new method and two new implementation.
(sendUrgentData): New method.
* java/natPlainSocketImpl.cc
(connect): Arguments changed, added support for timeouts.
(getOption): Another __java_boolean to jboolean.
From-SVN: r57009
Diffstat (limited to 'libjava/java/net/SocketImpl.java')
-rw-r--r-- | libjava/java/net/SocketImpl.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libjava/java/net/SocketImpl.java b/libjava/java/net/SocketImpl.java index 7dcf87d..1c90499 100644 --- a/libjava/java/net/SocketImpl.java +++ b/libjava/java/net/SocketImpl.java @@ -120,6 +120,21 @@ public abstract class SocketImpl implements SocketOptions throws IOException; /** + * Connects to the socket to the host specified in address. This + * method blocks until successful connected or the timeout occurs. + * A timeout of zero means no timout. + * + * @param address Data of remote host + * @param timeout time to wait to stop connecting + * + * @exception IOException If an error occurs + * + * @since 1.4 + */ + protected abstract void connect(SocketAddress address, int timeout) + throws IOException; + + /** * Binds to the specified port on the specified addr. Note that this addr * must represent a local IP address. * <p> @@ -215,6 +230,31 @@ public abstract class SocketImpl implements SocketOptions protected int getPort() { return port; } /** + * Returns true or false when this socket supports sending urgent data + * or not. + * + * @since 1.4 + */ + protected boolean supportsUrgentData() + { + // This method has to be overwritten by socket classes that support + // sending urgend data. + return false; + } + + /** + * Sends one byte of urgent data to the socket. + * + * @param data The byte to send, the low eight bits of it + * + * @exception IOException If an error occurs + * + * @since 1.4 + */ + protected abstract void sendUrgentData(int data) + throws IOException; + + /** * Returns the local port this socket is bound to * * @return The local port |