Uses of Class
java.net.SocketAddress
| Package | Description |
|---|---|
| com.sun.nio.sctp |
A Java API for Stream Control Transport Protocol.
|
| java.net |
Provides the classes for implementing networking applications.
|
| java.nio.channels |
Defines channels, which represent connections to entities that are capable of
performing I/O operations, such as files and sockets; defines selectors, for
multiplexed, non-blocking I/O operations.
|
-
Uses of SocketAddress in com.sun.nio.sctp
Fields in com.sun.nio.sctp with type parameters of type SocketAddress Modifier and Type Field Description static SctpSocketOption<SocketAddress>SctpStandardSocketOptions. SCTP_PRIMARY_ADDRRequests that the local SCTP stack use the given peer address as the association primary.static SctpSocketOption<SocketAddress>SctpStandardSocketOptions. SCTP_SET_PEER_PRIMARY_ADDRRequests that the peer mark the enclosed address as the association primary.Methods in com.sun.nio.sctp that return SocketAddress Modifier and Type Method Description abstract SocketAddressMessageInfo. address()Returns the source socket address if the message has been received, otherwise the preferred destination of the message to be sent.abstract SocketAddressPeerAddressChangeNotification. address()Returns the peer address.abstract SocketAddressSendFailedNotification. address()Returns the address.Methods in com.sun.nio.sctp that return types with arguments of type SocketAddress Modifier and Type Method Description abstract Set<SocketAddress>SctpChannel. getAllLocalAddresses()Returns all of the socket addresses to which this channel's socket is bound.abstract Set<SocketAddress>SctpMultiChannel. getAllLocalAddresses()Returns all of the socket addresses to which this channel's socket is bound.abstract Set<SocketAddress>SctpServerChannel. getAllLocalAddresses()Returns all of the socket addresses to which this channel's socket is bound.abstract Set<SocketAddress>SctpChannel. getRemoteAddresses()Returns all of the remote addresses to which this channel's socket is connected.abstract Set<SocketAddress>SctpMultiChannel. getRemoteAddresses(Association association)Returns all of the remote addresses to which the given association on this channel's socket is connected.Methods in com.sun.nio.sctp with parameters of type SocketAddress Modifier and Type Method Description abstract SctpChannelSctpChannel. bind(SocketAddress local)Binds the channel's socket to a local address.SctpMultiChannelSctpMultiChannel. bind(SocketAddress local)Binds the channel's socket to a local address and configures the socket to listen for connections.abstract SctpMultiChannelSctpMultiChannel. bind(SocketAddress local, int backlog)Binds the channel's socket to a local address and configures the socket to listen for connections.SctpServerChannelSctpServerChannel. bind(SocketAddress local)Binds the channel's socket to a local address and configures the socket to listen for associations.abstract SctpServerChannelSctpServerChannel. bind(SocketAddress local, int backlog)Binds the channel's socket to a local address and configures the socket to listen for associations.abstract booleanSctpChannel. connect(SocketAddress remote)Connects this channel's socket.abstract booleanSctpChannel. connect(SocketAddress remote, int maxOutStreams, int maxInStreams)Connects this channel's socket.static MessageInfoMessageInfo. createOutgoing(Association association, SocketAddress address, int streamNumber)Creates aMessageInfoinstance suitable for use when sending a message to a given association.static MessageInfoMessageInfo. createOutgoing(SocketAddress address, int streamNumber)Creates aMessageInfoinstance suitable for use when sending a message.static SctpChannelSctpChannel. open(SocketAddress remote, int maxOutStreams, int maxInStreams)Opens an SCTP channel and connects it to a remote address. -
Uses of SocketAddress in java.net
Subclasses of SocketAddress in java.net Modifier and Type Class Description classInetSocketAddressThis 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 Modifier and Type Method Description SocketAddressProxy. address()Returns the socket address of the proxy, ornullif its a direct connection.SocketAddressDatagramSocket. getLocalSocketAddress()Returns the address of the endpoint this socket is bound to.SocketAddressServerSocket. getLocalSocketAddress()Returns the address of the endpoint this socket is bound to.SocketAddressSocket. getLocalSocketAddress()Returns the address of the endpoint this socket is bound to.SocketAddressDatagramSocket. getRemoteSocketAddress()Returns the address of the endpoint this socket is connected to, ornullif it is unconnected.SocketAddressSocket. getRemoteSocketAddress()Returns the address of the endpoint this socket is connected to, ornullif it is unconnected.SocketAddressDatagramPacket. 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 Modifier and Type Method Description voidDatagramSocket. bind(SocketAddress addr)Binds this DatagramSocket to a specific address and port.voidServerSocket. bind(SocketAddress endpoint)Binds theServerSocketto a specific address (IP address and port number).voidServerSocket. bind(SocketAddress endpoint, int backlog)Binds theServerSocketto a specific address (IP address and port number).voidSocket. bind(SocketAddress bindpoint)Binds the socket to a local address.voidDatagramSocket. connect(SocketAddress addr)Connects this socket to a remote socket address (IP address + port number).voidSocket. connect(SocketAddress endpoint)Connects this socket to the server.voidSocket. connect(SocketAddress endpoint, int timeout)Connects this socket to the server with a specified timeout value.protected abstract voidSocketImpl. connect(SocketAddress address, int timeout)Connects this socket to the specified port number on the specified host.abstract voidProxySelector. connectFailed(URI uri, SocketAddress sa, IOException ioe)Called to indicate that a connection could not be established to a proxy/socks server.protected abstract voidDatagramSocketImpl. joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)Join the multicast group.voidMulticastSocket. joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)Joins the specified multicast group at the specified interface.protected abstract voidDatagramSocketImpl. leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf)Leave the multicast group.voidMulticastSocket. leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf)Leave a multicast group on a specified local interface.voidDatagramPacket. 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 Constructor Description DatagramPacket(byte[] buf, int offset, int length, SocketAddress address)Constructs a datagram packet for sending packets of lengthlengthwith offsetoffsetto the specified port number on the specified host.DatagramPacket(byte[] buf, int length, SocketAddress address)Constructs a datagram packet for sending packets of lengthlengthto the specified port number on the specified host.DatagramSocket(SocketAddress bindaddr)Creates a datagram socket, bound to the specified local socket address.MulticastSocket(SocketAddress bindaddr)Create a MulticastSocket bound to the specified socket address.Proxy(Proxy.Type type, SocketAddress sa)Creates an entry representing a PROXY connection. -
Uses of SocketAddress in java.nio.channels
Methods in java.nio.channels that return SocketAddress Modifier and Type Method Description abstract SocketAddressAsynchronousServerSocketChannel. getLocalAddress()Returns the socket address that this channel's socket is bound to.abstract SocketAddressAsynchronousSocketChannel. getLocalAddress()Returns the socket address that this channel's socket is bound to.abstract SocketAddressDatagramChannel. getLocalAddress()Returns the socket address that this channel's socket is bound to.SocketAddressNetworkChannel. getLocalAddress()Returns the socket address that this channel's socket is bound to.abstract SocketAddressServerSocketChannel. getLocalAddress()Returns the socket address that this channel's socket is bound to.abstract SocketAddressSocketChannel. getLocalAddress()Returns the socket address that this channel's socket is bound to.abstract SocketAddressAsynchronousSocketChannel. getRemoteAddress()Returns the remote address to which this channel's socket is connected.abstract SocketAddressDatagramChannel. getRemoteAddress()Returns the remote address to which this channel's socket is connected.abstract SocketAddressSocketChannel. getRemoteAddress()Returns the remote address to which this channel's socket is connected.abstract SocketAddressDatagramChannel. receive(ByteBuffer dst)Receives a datagram via this channel.Methods in java.nio.channels with parameters of type SocketAddress Modifier and Type Method Description AsynchronousServerSocketChannelAsynchronousServerSocketChannel. bind(SocketAddress local)Binds the channel's socket to a local address and configures the socket to listen for connections.abstract AsynchronousServerSocketChannelAsynchronousServerSocketChannel. bind(SocketAddress local, int backlog)Binds the channel's socket to a local address and configures the socket to listen for connections.abstract AsynchronousSocketChannelAsynchronousSocketChannel. bind(SocketAddress local)abstract DatagramChannelDatagramChannel. bind(SocketAddress local)NetworkChannelNetworkChannel. bind(SocketAddress local)Binds the channel's socket to a local address.ServerSocketChannelServerSocketChannel. bind(SocketAddress local)Binds the channel's socket to a local address and configures the socket to listen for connections.abstract ServerSocketChannelServerSocketChannel. bind(SocketAddress local, int backlog)Binds the channel's socket to a local address and configures the socket to listen for connections.abstract SocketChannelSocketChannel. bind(SocketAddress local)abstract Future<Void>AsynchronousSocketChannel. connect(SocketAddress remote)Connects this channel.abstract <A> voidAsynchronousSocketChannel. connect(SocketAddress remote, A attachment, CompletionHandler<Void,? super A> handler)Connects this channel.abstract DatagramChannelDatagramChannel. connect(SocketAddress remote)Connects this channel's socket.abstract booleanSocketChannel. connect(SocketAddress remote)Connects this channel's socket.static SocketChannelSocketChannel. open(SocketAddress remote)Opens a socket channel and connects it to a remote address.abstract intDatagramChannel. send(ByteBuffer src, SocketAddress target)Sends a datagram via this channel.