Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

CDC 1.1.2

Uses of Class
java.net.SocketAddress

Packages that use SocketAddress
java.net Provides the classes for implementing networking applications. 
 

Uses of SocketAddress in java.net
 

Subclasses of SocketAddress in java.net
 class InetSocketAddress
          This class implements an IP Socket Address (IP address + port number) It can also be a pair (hostname + port number), in which case an attempt will be made to resolve the hostname.
 

Methods in java.net that return SocketAddress
 SocketAddress DatagramSocket.getRemoteSocketAddress()
          Returns the address of the endpoint this socket is connected to, or null if it is unconnected.
 SocketAddress DatagramSocket.getLocalSocketAddress()
          Returns the address of the endpoint this socket is bound to, or null if it is not bound yet.
 SocketAddress DatagramPacket.getSocketAddress()
          Gets the SocketAddress (usually IP address + port number) of the remote host that this packet is being sent to or is coming from.
 

Methods in java.net with parameters of type SocketAddress
protected abstract  void DatagramSocketImpl.joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)
          Join the multicast group.
protected abstract  void DatagramSocketImpl.leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf)
          Leave the multicast group.
 void DatagramSocket.bind(SocketAddress addr)
          Binds this DatagramSocket to a specific address & port.
 void DatagramSocket.connect(SocketAddress addr)
          Connects this socket to a remote socket address (IP address + port number).
 void DatagramPacket.setSocketAddress(SocketAddress address)
          Sets the SocketAddress (usually IP address + port number) of the remote host to which this datagram is being sent.
 

Constructors in java.net with parameters of type SocketAddress
DatagramSocket(SocketAddress bindaddr)
          Creates a datagram socket, bound to the specified local socket address.
DatagramPacket(byte[] buf, int offset, int length, SocketAddress address)
          Constructs a datagram packet for sending packets of length length with offset ioffsetto the specified port number on the specified host.
DatagramPacket(byte[] buf, int length, SocketAddress address)
          Constructs a datagram packet for sending packets of length length to the specified port number on the specified host.
 


CDC 1.1.2

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 218 specification.