1 |
/* PlainSocketImpl.java -- Default socket implementation |
/* PlainSocketImpl.java -- Default socket implementation |
2 |
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
3 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
177 |
*/ |
*/ |
178 |
public native Object getOption(int optID) throws SocketException; |
public native Object getOption(int optID) throws SocketException; |
179 |
|
|
180 |
public void shutdownInput() |
/** |
181 |
{ |
* Flushes the input stream and closes it. If you read from the input stream |
182 |
throw new InternalError ("PlainSocketImpl::shutdownInput not implemented"); |
* after calling this method a <code>IOException</code> will be thrown. |
183 |
} |
* |
184 |
|
* @throws IOException if an error occurs |
185 |
|
*/ |
186 |
|
public native void shutdownInput() throws IOException; |
187 |
|
|
188 |
public void shutdownOutput() |
/** |
189 |
{ |
* Flushes the output stream and closes it. If you write to the output stream |
190 |
throw new InternalError ("PlainSocketImpl::shutdownOutput not implemented"); |
* after calling this method a <code>IOException</code> will be thrown. |
191 |
} |
* |
192 |
|
* @throws IOException if an error occurs |
193 |
|
*/ |
194 |
|
public native void shutdownOutput() throws IOException; |
195 |
|
|
196 |
/** |
/** |
197 |
* Creates a new socket that is not bound to any local address/port and |
* Creates a new socket that is not bound to any local address/port and |
201 |
* |
* |
202 |
* @param stream true for a stream socket, false for a datagram socket |
* @param stream true for a stream socket, false for a datagram socket |
203 |
*/ |
*/ |
204 |
protected native synchronized void create(boolean stream) throws IOException; |
protected synchronized native void create(boolean stream) throws IOException; |
205 |
|
|
206 |
/** |
/** |
207 |
* Connects to the remote hostname and port specified as arguments. |
* Connects to the remote hostname and port specified as arguments. |
270 |
* |
* |
271 |
* @exception IOException If an error occurs |
* @exception IOException If an error occurs |
272 |
*/ |
*/ |
273 |
protected native synchronized void bind(InetAddress addr, int port) |
protected synchronized native void bind(InetAddress addr, int port) |
274 |
throws IOException; |
throws IOException; |
275 |
|
|
276 |
/** |
/** |
283 |
* |
* |
284 |
* @exception IOException If an error occurs |
* @exception IOException If an error occurs |
285 |
*/ |
*/ |
286 |
protected native synchronized void listen(int queuelen) |
protected synchronized native void listen(int queuelen) |
287 |
throws IOException; |
throws IOException; |
288 |
|
|
289 |
/** |
/** |
292 |
* |
* |
293 |
* @param impl The SocketImpl object to accept this connection. |
* @param impl The SocketImpl object to accept this connection. |
294 |
*/ |
*/ |
295 |
protected native synchronized void accept(SocketImpl impl) |
protected synchronized native void accept(SocketImpl impl) |
296 |
throws IOException; |
throws IOException; |
297 |
|
|
298 |
/** |
/** |