Example usage for org.apache.commons.net.tftp ExtendedTFTP ExtendedTFTP

List of usage examples for org.apache.commons.net.tftp ExtendedTFTP ExtendedTFTP

Introduction

In this page you can find the example usage for org.apache.commons.net.tftp ExtendedTFTP ExtendedTFTP.

Prototype

public ExtendedTFTP() 

Source Link

Document

Creates a TFTP instance with a default timeout of DEFAULT_TIMEOUT, a null socket, and buffered operations disabled.

Usage

From source file:org.xenmaster.connectivity.tftp.TFTPServer.java

public TFTPServer() {
    tftp = new ExtendedTFTP();
    tftp.beginBufferedOps();/* w w  w  .  j  a va 2s  .c  o  m*/
    tftp.setDefaultTimeout(0);

    listeners = new LinkedList<>();
    resendTask = new ResendTask();
    thread = new Thread(this, "TFTP server");
    GlobalExecutorService.get().scheduleAtFixedRate(resendTask, 500, 500, TimeUnit.MILLISECONDS);
}