| public abstract class java.net DatagramSocketImpl
|
Java SE 6 |
| since | JDK1.1 |
| Fields | |
|---|---|
| protected int | localPort The local port number. |
| protected java.io.FileDescriptor | fd The file descriptor object. |
| Constructors | |
|---|---|
| public | DatagramSocketImpl() |
| Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract protected void | bind(int lport, InetAddress laddr) throws SocketException Details
Binds a datagram socket to a local port and address.
| ||||||||||
| abstract protected void | close() Close the socket. | ||||||||||
| protected void | connect(InetAddress address, int port) throws SocketException Details
Connects a datagram socket to a remote destination. This associates the remote
address with the local socket so that datagrams may only be sent to this destination
and received from this destination. This may be overridden to call a native
system connect.
If the remote destination to which the socket is connected does not exist, or is otherwise unreachable, and if an ICMP destination unreachable packet has been received for that address, then a subsequent call to send or receive may throw a PortUnreachableException. Note, there is no guarantee that the exception will be thrown.
| ||||||||||
| abstract protected void | create() throws SocketException Details
Creates a datagram socket.
| ||||||||||
| protected void | disconnect() Details
Disconnects a datagram socket from its remote destination.
| ||||||||||
| abstract protected void | join(InetAddress inetaddr) throws IOException Details
Join the multicast group.
| ||||||||||
| abstract protected void | joinGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException Details
Join the multicast group.
| ||||||||||
| abstract protected void | leave(InetAddress inetaddr) throws IOException Details
Leave the multicast group.
| ||||||||||
| abstract protected void | leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException Details
Leave the multicast group.
| ||||||||||
| abstract protected int | peek(InetAddress i) throws IOException Details
Peek at the packet to see who it is from. Updates the specified InetAddress
to the address which the packet came from.
| ||||||||||
| abstract protected int | peekData(DatagramPacket p) throws IOException Details
Peek at the packet to see who it is from. The data is copied into the specified
DatagramPacket. The data is returned,
but not consumed, so that a subsequent peekData/receive operation
will see the same data.
| ||||||||||
| abstract protected void | receive(DatagramPacket p) throws IOException Details
Receive the datagram packet.
| ||||||||||
| abstract protected void | send(DatagramPacket p) throws IOException Details
Sends a datagram packet. The packet contains the data and the
destination address to send the packet to.
| ||||||||||
| Properties | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| protected java.io.FileDescriptor | getFileDescriptor() Details
Gets the datagram socket file descriptor.
| ||||||||
| protected int | getLocalPort() Details
Gets the local port.
| ||||||||
| abstract protected void | setTimeToLive(int ttl) throws IOException Details
Set the TTL (time-to-live) option.
| ||||||||
| abstract protected int | getTimeToLive() throws IOException Details
Retrieve the TTL (time-to-live) option.
| ||||||||
| abstract protected void | setTTL(byte ttl) throws IOException Details
Set the TTL (time-to-live) option.
| ||||||||
| abstract protected byte | getTTL() throws IOException Details
Retrieve the TTL (time-to-live) option.
| ||||||||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|