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 GameEightConfig implements CommandLineRunner {

    public static WebSocketConnent webSocketConnent;

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