Package org.apache.commons.net

Examples of org.apache.commons.net.DaytimeTCPClient


public final class daytime
{

    public static final void daytimeTCP(String host) throws IOException
    {
        DaytimeTCPClient client = new DaytimeTCPClient();

        // We want to timeout if a response takes longer than 60 seconds
        client.setDefaultTimeout(60000);
        client.connect(host);
        System.out.println(client.getTime().trim());
        client.disconnect();
    }
View Full Code Here


public final class daytime
{

    public static final void daytimeTCP(String host) throws IOException
    {
        DaytimeTCPClient client = new DaytimeTCPClient();

        // We want to timeout if a response takes longer than 60 seconds
        client.setDefaultTimeout(60000);
        client.connect(host);
        System.out.println(client.getTime().trim());
        client.disconnect();
    }
View Full Code Here

public final class daytime
{

    public static final void daytimeTCP(String host) throws IOException
    {
        DaytimeTCPClient client = new DaytimeTCPClient();

        // We want to timeout if a response takes longer than 60 seconds
        client.setDefaultTimeout(60000);
        client.connect(host);
        System.out.println(client.getTime().trim());
        client.disconnect();
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.net.DaytimeTCPClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.