Code example for Socket

Methods: setKeepAlive

0
        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);
        super.setSoTimeout(to);
    } 
 
    @Override 
    public void setSendBufferSize(int size) throws SocketException {