当前位置:网站首页>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
边栏推荐
- 2022年7月10日“五心公益”活动通知+报名入口(二维码)
- What are the test preparation materials and methods for soft exam information processing technicians?
- Leetcode-303: region and retrieval - array immutable
- Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
- Socket communication principle and Practice
- 2022.7.6DAY598
- 简单易修改的弹框组件
- Elegant controller layer code
- How to play video on unityui
- Simple and easy to modify spring frame components
猜你喜欢
1323: [example 6.5] activity selection
想考中级软考,一般需要多少复习时间?
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
Find the greatest common divisor and the least common multiple (C language)
String formatting
BUUCTF---Reverse---reverse1
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
使用 load_decathlon_datalist (MONAI)快速加载JSON数据
P1223 queuing for water /1319: [example 6.1] queuing for water
Elegant controller layer code
随机推荐
How to successfully pass the senior system architecture designer in the second half of the year?
Deep understanding of Apache Hudi asynchronous indexing mechanism
leetcode-560:和为 K 的子数组
CC2530 ZigBee iar8.10.1 environment construction
原型与原型链
CSAPP Bomb Lab 解析
那些易混淆的概念(三):function和class
【推荐系统 01】Rechub
Typescript interface inheritance
When do you usually get grades in the soft exam? Online pedaling?
SQL Server knowledge collection 11: Constraints
Cluster task scheduling system lsf/sge/slurm/pbs based on HPC scenario
Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
Trajectory planning for multi robot systems: methods and Applications Overview reading notes
PHP \ newline cannot be output
[STM32] solution to the problem that SWD cannot recognize devices after STM32 burning program
想考中级软考,一般需要多少复习时间?
2022.7.3DAY595
关于easyflash v3.3使用过程的记录
Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr