Merge remote-tracking branch 'origin/dev_robotaxi-d_230809_6.0.0' into dev_robotaxi-d_230809_6.0.0
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package com.zhidao.support.adas.high.socket;
|
||||
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_WEB_SOCKET_MESSAGE_BYTE;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_WEB_SOCKET_MESSAGE_JSON;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_WEB_SOCKET_OPEN;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_SOURCE_ADAS;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_TYPE_INIT_STATUS;
|
||||
@@ -25,6 +23,7 @@ import com.zhidao.support.adas.high.queue.WebSocketQueueManager;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@@ -33,6 +32,7 @@ import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
import okhttp3.WebSocket;
|
||||
import okhttp3.WebSocketListener;
|
||||
import okhttp3.internal.ws.RealWebSocket;
|
||||
import okio.ByteString;
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ public class FpgaSocket implements IWebSocket {
|
||||
private static final String TAG = FpgaSocket.class.getSimpleName();
|
||||
private OkHttpClient client;
|
||||
|
||||
private volatile WebSocket mWebSocket;
|
||||
private volatile RealWebSocket mWebSocket;
|
||||
|
||||
private EchoWebSocketListener listener;
|
||||
private IWebSocketConnectListener mWebSocketConnectListener;
|
||||
@@ -123,7 +123,9 @@ public class FpgaSocket implements IWebSocket {
|
||||
Request request = new Request.Builder()
|
||||
.url(wsHost)
|
||||
.build();
|
||||
mWebSocket = client.newWebSocket(request, listener);
|
||||
mWebSocket = new RealWebSocket(request, listener, new Random(), 0);
|
||||
mWebSocket.connect(client);
|
||||
// mWebSocket = client.newWebSocket(request, listener);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user