package com.game.business.config;

import com.game.business.util.Common;
import com.game.business.websocket.WebSocketConnent;
import org.springframework.boot.CommandLineRunner;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

@Component
@EnableAsync
public class GameFourConfig implements CommandLineRunner {

    public static WebSocketConnent webSocketConnent;

    @Override
    @Async
    public void run(String... args) throws Exception {
        webSocketConnent = new WebSocketConnent(Common.WS_GAME_FOUR_URL, Common.WS_GAME_FOUR_REMARK_URL, Common.GAME_FOUR_NAME);
        webSocketConnent.connect();
    }
}
