1 |
/* DatagramSocketImpl.java -- Abstract class for UDP socket implementations |
/* DatagramSocketImpl.java -- Abstract class for UDP socket implementations |
2 |
Copyright (C) 1998, 1999 2000, 2001, 2002 Free Software Foundation, Inc. |
Copyright (C) 1998, 1999 2000, 2001, |
3 |
|
2002, 2003 Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
6 |
|
|
103 |
* Takes a peek at the next packet received in order to retrieve the |
* Takes a peek at the next packet received in order to retrieve the |
104 |
* address of the sender |
* address of the sender |
105 |
* |
* |
106 |
* @param i The InetAddress to fill in with the information about the |
* @param i The <code>InetAddress</code> to fill in with the information |
107 |
* sender if the next packet |
* about the sender if the next packet |
108 |
* |
* |
109 |
* @return The port number of the sender of the packet |
* @return The port number of the sender of the packet |
110 |
* |
* |
119 |
* Takes a peek at the next packet received. This packet is not consumed. |
* Takes a peek at the next packet received. This packet is not consumed. |
120 |
* With the next peekData/receive operation this packet will be read again. |
* With the next peekData/receive operation this packet will be read again. |
121 |
* |
* |
122 |
* @param p The DatagramPacket to fill in with the data sent. |
* @param p The <code>DatagramPacket</code> to fill in with the data sent. |
123 |
* |
* |
124 |
* @return The port number of the sender of the packet. |
* @return The port number of the sender of the packet. |
125 |
* |
* |
148 |
/** |
/** |
149 |
* Receives a packet of data from the network Will block until a packet |
* Receives a packet of data from the network Will block until a packet |
150 |
* arrives. The packet info in populated into the passed in |
* arrives. The packet info in populated into the passed in |
151 |
* DatagramPacket object. |
* <code>DatagramPacket</code> object. |
152 |
* |
* |
153 |
* @param p A place to store the incoming packet. |
* @param p A place to store the incoming packet. |
154 |
* |
* |
162 |
/** |
/** |
163 |
* Connects the socket to a host specified by address and port. |
* Connects the socket to a host specified by address and port. |
164 |
* |
* |
165 |
* @param address The InetAddress of the host to connect to |
* @param address The <code>InetAddress</code> of the host to connect to |
166 |
* @param port The port number of the host to connect to |
* @param port The port number of the host to connect to |
167 |
* |
* |
168 |
* @exception SocketException If an error occurs |
* @exception SocketException If an error occurs |
289 |
* Sets the specified option on a socket to the passed in object. For |
* Sets the specified option on a socket to the passed in object. For |
290 |
* options that take an integer argument, the passed in object is an |
* options that take an integer argument, the passed in object is an |
291 |
* <code>Integer</code>. For options that are set to on or off, the |
* <code>Integer</code>. For options that are set to on or off, the |
292 |
* value passed will be a <code>Boolean</code>. The <code>option_id</code> |
* value passed will be a <code>Boolean</code>. The <code>optionId</code> |
293 |
* parameter is one of the defined constants in the superinterface. |
* parameter is one of the defined constants in the superinterface. |
294 |
* |
* |
295 |
* @param option_id The identifier of the option |
* @param optionId The identifier of the option |
296 |
* @param val The value to set the option to |
* @param val The value to set the option to |
297 |
* |
* |
298 |
* @exception SocketException If an error occurs |
* @exception SocketException If an error occurs |
299 |
* @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. |
* @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. |
300 |
*/ |
*/ |
301 |
public abstract void setOption(int option_id, Object val) |
public abstract void setOption(int optionId, Object val) |
302 |
throws SocketException; |
throws SocketException; |
303 |
|
|
304 |
/** |
/** |
305 |
* Returns the current setting of the specified option. The |
* Returns the current setting of the specified option. The |
306 |
* <code>Object</code> returned will be an <code>Integer</code> for options |
* <code>Object</code> returned will be an <code>Integer</code> for options |
307 |
* that have integer values. For options that are set to on or off, a |
* that have integer values. For options that are set to on or off, a |
308 |
* <code>Boolean</code> will be returned. The <code>option_id</code> |
* <code>Boolean</code> will be returned. The <code>optionId</code> |
309 |
* is one of the defined constants in the superinterface. |
* is one of the defined constants in the superinterface. |
310 |
* |
* |
311 |
* @param option_id The option identifier |
* @param optionId The option identifier |
312 |
* |
* |
313 |
* @return The current value of the option |
* @return The current value of the option |
314 |
* |
* |