diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-10 18:02:02 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-10 18:02:02 +0000 |
commit | d26ccc71479ab28691c5c05bd943220d3b752cf7 (patch) | |
tree | efa74de037bafc64f9022b0f9ef627af5465a3cb /libjava/java/net/SocketImpl.java | |
parent | c34be7cd22ab3eb2e1677b7ad7e7a77ca49ed513 (diff) | |
download | ppe42-gcc-d26ccc71479ab28691c5c05bd943220d3b752cf7.tar.gz ppe42-gcc-d26ccc71479ab28691c5c05bd943220d3b752cf7.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57009 138bc75d-0d04-0410-961f-82ee72b054a4
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 7dcf87de629..1c9049950e5 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 |