Code example for Socket

Methods: getSoTimeout

0
    } 
 
    public int getSocketTimeout() { 
        if (this.socket != null) {
            try { 
                return this.socket.getSoTimeout();
            } catch (final SocketException ignore) {
                return -1; 
            } 
        } else { 
            return -1; 
        } 
    } 
 
    public void shutdown() throws IOException { 
        this.open = false;
        final Socket tmpsocket = this.socket;
        if (tmpsocket != null) {
            tmpsocket.close();
        } 
    }