当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
想考中级软考,一般需要多少复习时间?
Those confusing concepts (3): function and class
2021 summary and 2022 outlook
Mendeley--免费的文献管理工具,给论文自动插入参考文献
路由器开发知识汇总
How much review time does it usually take to take the intermediate soft exam?
Schnuka: working principle of robot visual grasping machine visual grasping
單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
Leetcode-304: two dimensional area and retrieval - matrix immutable
中级软件评测师考什么
[detailed explanation of Huawei machine test] tall and short people queue up
Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr
BUUCTF---Reverse---reverse1
软考信息处理技术员有哪些备考资料与方法?
小程序跳转H5,配置业务域名经验教程
Elegant controller layer code
SQL Server 知识汇集11 : 约束
[dai6] mirror image of JZ27 binary tree
BUUCTF---Reverse---reverse1
[pytorch 07] hands on deep learning chapter_ Preliminaries/ndarray exercises hands-on version







