232 |
return "[addr=" + address.toString() + ",port=" + Integer.toString(port) |
return "[addr=" + address.toString() + ",port=" + Integer.toString(port) |
233 |
+ ",localport=" + Integer.toString(localport) + "]"; |
+ ",localport=" + Integer.toString(localport) + "]"; |
234 |
} |
} |
235 |
|
|
236 |
|
/** |
237 |
|
* Sets the specified option on a socket to the passed in object. For |
238 |
|
* options that take an integer argument, the passed in object is an |
239 |
|
* <code>Integer</code>. For options that are set to on or off, the |
240 |
|
* value passed will be a <code>Boolean</code>. The <code>option_id</code> |
241 |
|
* parameter is one of the defined constants in the superinterface. |
242 |
|
* |
243 |
|
* @param option_id The identifier of the option |
244 |
|
* @param val The value to set the option to |
245 |
|
* |
246 |
|
* @exception SocketException If an error occurs |
247 |
|
* @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. |
248 |
|
*/ |
249 |
|
public abstract void setOption(int option_id, Object val) |
250 |
|
throws SocketException; |
251 |
|
|
252 |
|
/** |
253 |
|
* Returns the current setting of the specified option. The |
254 |
|
* <code>Object</code> returned will be an <code>Integer</code> for options |
255 |
|
* that have integer values. For options that are set to on or off, a |
256 |
|
* <code>Boolean</code> will be returned. The <code>option_id</code> |
257 |
|
* is one of the defined constants in the superinterface. |
258 |
|
* |
259 |
|
* @param option_id The option identifier |
260 |
|
* |
261 |
|
* @return The current value of the option |
262 |
|
* |
263 |
|
* @exception SocketException If an error occurs |
264 |
|
* @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. |
265 |
|
*/ |
266 |
|
public abstract Object getOption(int option_id) throws SocketException; |
267 |
} |
} |