Example usage for java.net Socket getTcpNoDelay

List of usage examples for java.net Socket getTcpNoDelay

Introduction

In this page you can find the example usage for java.net Socket getTcpNoDelay.

Prototype

public boolean getTcpNoDelay() throws SocketException 

Source Link

Document

Tests if SocketOptions#TCP_NODELAY TCP_NODELAY is enabled.

Usage

From source file:Main.java

public static void main(String[] args) throws Exception {
    Socket client = new Socket("google.com", 80);
    client.setTcpNoDelay(true);/*from  ww w .j  av  a 2 s  .  c o m*/
    System.out.println(client.getTcpNoDelay());

    client.close();
}