Code example for Socket

Methods: setReuseAddress

0
        socket.setTcpNoDelay(on);
    } 
 
    @Override 
    public void setReuseAddress(boolean on) throws SocketException {
        socket.setReuseAddress(on);
    } 
 
    @Override 
    public void setKeepAlive(boolean on) throws SocketException {
        socket.setKeepAlive(on);
    } 
 
    @Override 
    public void setTrafficClass(int tos) throws SocketException {
        socket.setTrafficClass(tos);
    } 
 
    @Override 
    public void setSoTimeout(int to) throws SocketException {
        socket.setSoTimeout(to);