115 |
protected abstract int peek(InetAddress i) throws IOException; |
protected abstract int peek(InetAddress i) throws IOException; |
116 |
|
|
117 |
/** |
/** |
118 |
|
* Takes a peek at the next packet received. This packet is not consumed. |
119 |
|
* With the next peekData/receive operation this packet will be read again. |
120 |
|
* |
121 |
|
* @param p The DatagramPacket to fill in with the data sent. |
122 |
|
* |
123 |
|
* @return The port number of the sender of the packet. |
124 |
|
* |
125 |
|
* @exception IOException If an error occurs |
126 |
|
* @exception PortUnreachableException May be thrown if the socket is |
127 |
|
* connected to a currently unreachable destination. Note, there is no |
128 |
|
* guarantee that the exception will be thrown. |
129 |
|
* |
130 |
|
* @since 1.4 |
131 |
|
*/ |
132 |
|
protected abstract int peekData (DatagramPacket p) throws IOException; |
133 |
|
|
134 |
|
/** |
135 |
* Transmits the specified packet of data to the network. The destination |
* Transmits the specified packet of data to the network. The destination |
136 |
* host and port should be encoded in the packet. |
* host and port should be encoded in the packet. |
137 |
* |
* |
240 |
protected abstract void leave(InetAddress inetaddr) throws IOException; |
protected abstract void leave(InetAddress inetaddr) throws IOException; |
241 |
|
|
242 |
/** |
/** |
243 |
|
* Causes this socket to join the specified multicast group on a specified |
244 |
|
* device |
245 |
|
* |
246 |
|
* @param mcastaddr The address to leave |
247 |
|
* @param netIf The specified network interface to join the group at |
248 |
|
* |
249 |
|
* @exception IOException If an error occurs |
250 |
|
* |
251 |
|
* @since 1.4 |
252 |
|
*/ |
253 |
|
protected abstract void joinGroup (SocketAddress mcastaddr, |
254 |
|
NetworkInterface netIf) |
255 |
|
throws IOException; |
256 |
|
|
257 |
|
/** |
258 |
|
* Leaves a multicast group |
259 |
|
* |
260 |
|
* @param mcastaddr The address to join |
261 |
|
* @param netIf The specified network interface to leave the group at |
262 |
|
* |
263 |
|
* @exception IOException If an error occurs |
264 |
|
* |
265 |
|
* @since 1.4 |
266 |
|
*/ |
267 |
|
protected abstract void leaveGroup (SocketAddress mcastaddr, |
268 |
|
NetworkInterface netIf) |
269 |
|
throws IOException; |
270 |
|
|
271 |
|
/** |
272 |
* Returns the FileDescriptor for this socket |
* Returns the FileDescriptor for this socket |
273 |
*/ |
*/ |
274 |
protected FileDescriptor getFileDescriptor() |
protected FileDescriptor getFileDescriptor() |