package websocketclient.bs;
/**
* @Description: MyClientTest
* @Author: zhao
**/
import websocketclient.JsonUtil;
import websocketclient.MyClient;
import websocketclient.ProtocolDTO;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class Cmd30 {
public static void main(String[] args){
URI uri = URI.create("ws://111.30.97.42:8000");
final MyClient myClient = new MyClient(uri);
// 保证socket一直连接
ScheduledThreadPoolExecutor scheduled = new ScheduledThreadPoolExecutor(2);
scheduled.scheduleAtFixedRate(new Runnable()
java的WebSocket测试程序,发送、接受数据
最新推荐文章于 2024-05-12 07:07:45 发布