当前位置:网站首页>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
边栏推荐
- Typescript interface inheritance
- 中级软件评测师考什么
- 使用 load_decathlon_datalist (MONAI)快速加载JSON数据
- 【STM32】实战3.1—用STM32与TB6600驱动器驱动42步进电机(一)
- Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe
- SQL Server 知识汇集9 : 修改数据
- 1323: [example 6.5] activity selection
- How much review time does it usually take to take the intermediate soft exam?
- Schnuka: machine vision positioning technology machine vision positioning principle
- 优雅的 Controller 层代码
猜你喜欢
SQL Server knowledge gathering 9: modifying data
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
Unable to open kernel device '\.\vmcidev\vmx': operation completed successfully. Reboot after installing vmware workstation? Module "devicepoweron" failed to start. Failed to start the virtual machine
Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
优雅的 Controller 层代码
单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
What are the test preparation materials and methods for soft exam information processing technicians?
The difference between monotonicity constraint and anti monotonicity constraint
Différences entre les contraintes monotones et anti - monotones
Mendeley -- a free document management tool that automatically inserts references into papers
随机推荐
Find the greatest common divisor and the least common multiple (C language)
[STM32] solution to the problem that SWD cannot recognize devices after STM32 burning program
Prototype and prototype chain
路由器开发知识汇总
How to successfully pass the senior system architecture designer in the second half of the year?
[OneNote] can't connect to the network and can't sync the problem
Online hard core tools
中级软件评测师考什么
2022年上半年5月网络工程师试题及答案
Using U2 net deep network to realize -- certificate photo generation program
1324: [example 6.6] integer interval
中级网络工程师是什么?主要是考什么,有什么用?
Différences entre les contraintes monotones et anti - monotones
深入理解Apache Hudi异步索引机制
JS implementation chain call
openinstall与虎扑达成合作,挖掘体育文化产业数据价值
Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
How embedded engineers improve work efficiency
Deep understanding of Apache Hudi asynchronous indexing mechanism
Use of dotween