17 Haziran 2021 Perşembe

Reactor Netty TcpClient Sınıfı

connectNow metodu
Örnek
Şöyle yaparız
import reactor.netty.Connection;
import reactor.netty.tcp.TcpClient;

public class Application {

  public static void main(String[] args) {
    Connection connection =
      TcpClient.create()
        .host("example.com") 
        .port(80)            
        .connectNow();

    connection.onDispose()
      .block();
    }
}

Hiç yorum yok:

Yorum Gönder