SocketClientConfig.java
864 Bytes
package com.huaheng.framework.config;
import lombok.extern.slf4j.Slf4j;
import org.java_websocket.client.WebSocketClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.MultiValueMap;
import javax.annotation.PostConstruct;
import javax.websocket.ContainerProvider;
import javax.websocket.Session;
import javax.websocket.WebSocketContainer;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
@Configuration
@Slf4j
public class SocketClientConfig {
public static Session session;
@Bean
public SocketHandler socketHandler() throws URISyntaxException {
return new SocketHandler();
}
}