package ch.polgrabia.demos.client;

import io.vertx.core.Vertx;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WebsocketClientApp {
    private static final Logger logger = LoggerFactory.getLogger(WebsocketClientApp.class);
    public static void main(String[] args) {
        var vertx = Vertx.vertx();
        logger.info("Deploying websocket particle");
        WebsocketClientParticle websocketClientParticle = new WebsocketClientParticle(
          "localhost",
          8080,
          "/test",
          8123);
        vertx.deployVerticle(websocketClientParticle);
        logger.info("Deployed websocket particle");
        websocketClientParticle
                .waitingUntilFinished()
                .join();
        vertx.undeploy(websocketClientParticle.deploymentID());
        vertx.close();
    }
}
