Example usage for io.vertx.core.net NetSocket sendFile

List of usage examples for io.vertx.core.net NetSocket sendFile

Introduction

In this page you can find the example usage for io.vertx.core.net NetSocket sendFile.

Prototype

default Future<Void> sendFile(String filename) 

Source Link

Document

Tell the operating system to stream a file as specified by filename directly from disk to the outgoing connection, bypassing userspace altogether (where supported by the underlying operating system.

Usage

From source file:examples.NetExamples.java

License:Open Source License

public void example10(NetSocket socket) {

    socket.sendFile("myfile.dat");
}