当前位置:网站首页>Unity websocket client
Unity websocket client
2022-07-07 10:49:00 【HCC2017】
be based on WebSocketSharp
public class WebSocketClient : MonoBehaviour
{
private string url = "ws://"
public WebSocket webSocket;
private void Start()
{
Application.targetFrameRate = 60;
vehicleProperties = new VehicleProperties();
vehicleProperties.at_id.Add(carName);
webSocket = Init(url);
Register();
}
public bool ConnState(WebSocket ws)
{
if (ws == null)
return false;
if (ws.ReadyState==WebSocketState.Open)
{
return true;
}
return false;
}
private WebSocket Init(string url )
{
// Debug.LogError(" initialization ");
WebSocket ws= new WebSocket(url);
ws.WaitTi
边栏推荐
- How to prepare for the advanced soft test (network planning designer)?
- TypeScript 接口继承
- 【推薦系統 01】Rechub
- Basic introduction of yarn and job submission process
- 使用Tansformer分割三维腹部多器官--UNETR实战
- 原型与原型链
- Using U2 net deep network to realize -- certificate photo generation program
- Monai version has been updated to 0.9. See what new functions it has
- Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
- JS实现链式调用
猜你喜欢
单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
What does intermediate software evaluator test
Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
2021 summary and 2022 outlook
Trajectory planning for multi robot systems: methods and Applications Overview reading notes
Online hard core tools
555 circuit details
使用 load_decathlon_datalist (MONAI)快速加载JSON数据
How to successfully pass the senior system architecture designer in the second half of the year?
中级软件评测师考什么
随机推荐
Summary of router development knowledge
Is the soft test intermediate useful??
VR development optimization
Leetcode-560: subarray with sum K
中级网络工程师是什么?主要是考什么,有什么用?
July 10, 2022 "five heart public welfare" activity notice + registration entry (two-dimensional code)
ThreadLocal会用可不够
Mendeley -- a free document management tool that automatically inserts references into papers
JS实现链式调用
I'd rather say simple problems a hundred times than do complex problems once
[dai6] mirror image of JZ27 binary tree
Find the greatest common divisor and the least common multiple (C language)
The difference between monotonicity constraint and anti monotonicity constraint
Arduino receives and sends strings
What is an intermediate network engineer? What is the main test and what is the use?
简单易修改的弹框组件
P2788 math 1 - addition and subtraction
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
The mobile terminal automatically adjusts the page content and font size by setting rem
使用U2-Net深层网络实现——证件照生成程序