Uses of Class
java.net.SocketAddress
| Package | Description |
|---|---|
| java.net | |
| java.nio.channels | |
| libcore.io | |
| org.conscrypt |
-
Uses of SocketAddress in java.net
Subclasses of SocketAddress in java.net Modifier and Type Class Description classInetSocketAddressThis class represents a socket endpoint described by a IP address and a port number.Methods in java.net that return SocketAddress Modifier and Type Method Description SocketAddressProxy. address()Gets the address of thisProxyinstance.SocketAddressDatagramSocket. getLocalSocketAddress()Returns theSocketAddressthis socket is bound to, or null for an unbound socket.SocketAddressServerSocket. getLocalSocketAddress()Gets the local socket address of this server socket ornullif the socket is unbound.SocketAddressSocket. getLocalSocketAddress()Returns the local address and port of this socket as a SocketAddress or null if the socket is unbound.SocketAddressDatagramSocket. getRemoteSocketAddress()Returns theSocketAddressthis socket is connected to, or null for an unconnected socket.SocketAddressSocket. getRemoteSocketAddress()Returns the remote address and port of this socket as aSocketAddressor null if the socket is not connected.SocketAddressDatagramPacket. getSocketAddress()Gets the host address and the port to which this datagram packet is sent as aSocketAddressobject.Methods in java.net with parameters of type SocketAddress Modifier and Type Method Description voidDatagramSocket. bind(SocketAddress localAddr)Binds this socket to the local address and port specified bylocalAddr.voidServerSocket. bind(SocketAddress localAddr)Binds this server socket to the given local socket address with a maximum backlog of 50 unaccepted connections.voidServerSocket. bind(SocketAddress localAddr, int backlog)Binds this server socket to the given local socket address.voidSocket. bind(SocketAddress localAddr)Binds this socket to the given local host address and port specified by the SocketAddresslocalAddr.voidDatagramSocket. connect(SocketAddress peer)Connects this datagram socket to the address and port specified bypeer.protected voidPlainSocketImpl. connect(SocketAddress remoteAddr, int timeout)voidSocket. connect(SocketAddress remoteAddr)Connects this socket to the given remote host address and port specified by the SocketAddressremoteAddr.voidSocket. connect(SocketAddress remoteAddr, int timeout)Connects this socket to the given remote host address and port specified by the SocketAddressremoteAddrwith the specified timeout.protected abstract voidSocketImpl. connect(SocketAddress remoteAddr, int timeout)Connects this socket to the remote host address and port number specified by theSocketAddressobject with the given timeout.abstract voidProxySelector. connectFailed(URI uri, SocketAddress address, IOException failure)Notifies thisProxySelectorthat a connection to the proxy server could not be established.protected abstract voidDatagramSocketImpl. joinGroup(SocketAddress addr, NetworkInterface netInterface)Adds this socket to the multicast groupaddr.voidMulticastSocket. joinGroup(SocketAddress groupAddress, NetworkInterface netInterface)Adds this socket to the specified multicast group.voidPlainDatagramSocketImpl. joinGroup(SocketAddress addr, NetworkInterface netInterface)protected abstract voidDatagramSocketImpl. leaveGroup(SocketAddress addr, NetworkInterface netInterface)Removes this socket from the multicast groupaddr.voidMulticastSocket. leaveGroup(SocketAddress groupAddress, NetworkInterface netInterface)Removes this socket from the specified multicast group.voidPlainDatagramSocketImpl. leaveGroup(SocketAddress addr, NetworkInterface netInterface)voidDatagramPacket. setSocketAddress(SocketAddress sockAddr)Sets theSocketAddressfor this datagram packet.Constructors in java.net with parameters of type SocketAddress Constructor Description DatagramPacket(byte[] data, int offset, int length, SocketAddress sockAddr)Constructs a newDatagramPacketobject to send data to the addresssockAddr.DatagramPacket(byte[] data, int length, SocketAddress sockAddr)Constructs a newDatagramPacketobject to send data to the addresssockAddr.DatagramSocket(SocketAddress localAddr)Constructs a newDatagramSocketbound to the host/port specified by theSocketAddresslocalAddror an unboundDatagramSocketif theSocketAddressisnull.MulticastSocket(SocketAddress localAddress)Constructs aMulticastSocketbound to the address and port specified bylocalAddress, or an unboundMulticastSocketiflocalAddress == null.Proxy(Proxy.Type type, SocketAddress sa)Creates a newProxyinstance. -
Uses of SocketAddress in java.nio.channels
Methods in java.nio.channels that return SocketAddress Modifier and Type Method Description abstract SocketAddressDatagramChannel. receive(ByteBuffer target)Gets a datagram from this channel.Methods in java.nio.channels with parameters of type SocketAddress Modifier and Type Method Description abstract DatagramChannelDatagramChannel. connect(SocketAddress address)Connects the socket of this channel to a remote address, which is the only communication peer for getting and sending datagrams after being connected.abstract booleanSocketChannel. connect(SocketAddress address)Connects this channel's socket with a remote address.static SocketChannelSocketChannel. open(SocketAddress address)Creates a socket channel and connects it to a socket address.abstract intDatagramChannel. send(ByteBuffer source, SocketAddress address)Sends a datagram through this channel. -
Uses of SocketAddress in libcore.io
Methods in libcore.io that return SocketAddress Modifier and Type Method Description SocketAddressForwardingOs. getpeername(FileDescriptor fd)SocketAddressOs. getpeername(FileDescriptor fd)SocketAddressPosix. getpeername(FileDescriptor fd)SocketAddressForwardingOs. getsockname(FileDescriptor fd)SocketAddressOs. getsockname(FileDescriptor fd)SocketAddressPosix. getsockname(FileDescriptor fd) -
Uses of SocketAddress in org.conscrypt
Methods in org.conscrypt that return SocketAddress Modifier and Type Method Description SocketAddressOpenSSLSocketImplWrapper. getLocalSocketAddress()SocketAddressSSLSocketWrapper. getLocalSocketAddress()SocketAddressOpenSSLSocketImplWrapper. getRemoteSocketAddress()SocketAddressSSLSocketWrapper. getRemoteSocketAddress()Methods in org.conscrypt with parameters of type SocketAddress Modifier and Type Method Description voidOpenSSLSocketImplWrapper. bind(SocketAddress sockaddr)voidSSLSocketWrapper. bind(SocketAddress sockaddr)voidOpenSSLSocketImplWrapper. connect(SocketAddress sockaddr)voidOpenSSLSocketImplWrapper. connect(SocketAddress sockaddr, int timeout)voidSSLSocketImpl. connect(SocketAddress endpoint)This method works according to the specification of implemented class.voidSSLSocketImpl. connect(SocketAddress endpoint, int timeout)This method works according to the specification of implemented class.voidSSLSocketWrapper. connect(SocketAddress sockaddr)voidSSLSocketWrapper. connect(SocketAddress sockaddr, int timeout)