Code example for Socket

Methods: getRemoteSocketAddress

0
        throw new IOException("Underlying socket is already connected.");
    } 
 
    @Override 
    public SocketAddress getRemoteSocketAddress() {
        return socket.getRemoteSocketAddress();
    } 
 
    @Override 
    public SocketAddress getLocalSocketAddress() {
        return socket.getLocalSocketAddress();
    } 
 
    @Override 
    public InetAddress getLocalAddress() {
        return socket.getLocalAddress();
    } 
 
    @Override 
    public InetAddress getInetAddress() {
        return socket.getInetAddress();