当前位置:网站首页>Unity websocket server
Unity websocket server
2022-07-07 10:49:00 【HCC2017】
public class WebSocketServers
{
int port = 9292;// Monitor port number
public WebSocketServer wsServer = null;
public WebSocketServers(int port)
{
if (wsServer == null)
{
InitServer(port);
}
}
public void CloseServer()
{
if (wsServer == null)
return;
wsServer.Stop();
}
void InitServer(int port)
{
IPAddress iP = new IPAddress(new byte[] { 127, 0, 0, 1 });
wsServer = new WebSocketServer(iP, port);
wsServer.AddWebSocketService<Chat>("/");
wsServer.AddWebSocketService<Chat>("/SetToken");
wsServe
边栏推荐
- When do you usually get grades in the soft exam? Online pedaling?
- Deep understanding of Apache Hudi asynchronous indexing mechanism
- 【PyTorch 07】 动手学深度学习——chapter_preliminaries/ndarray 习题动手版
- Jump to the mobile terminal page or PC terminal page according to the device information
- Using U2 net deep network to realize -- certificate photo generation program
- Is the gold content of intermediate e-commerce division in the soft exam high?
- [système recommandé 01] rechub
- How much review time does it usually take to take the intermediate soft exam?
- 【机器学习 03】拉格朗日乘子法
- Elegant controller layer code
猜你喜欢
单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
简单易修改的弹框组件
Find the root of equation ax^2+bx+c=0 (C language)
中级软件评测师考什么
CSAPP Bomb Lab 解析
深入理解Apache Hudi异步索引机制
When do you usually get grades in the soft exam? Online pedaling?
[système recommandé 01] rechub
BUUCTF---Reverse---reverse1
CSAPP bomb lab parsing
随机推荐
ArrayList thread insecurity and Solutions
Kotlin realizes wechat interface switching (fragment exercise)
深入理解Apache Hudi异步索引机制
What are the test preparation materials and methods for soft exam information processing technicians?
[machine learning 03] Lagrange multiplier method
南航 PA3.1
TypeScript 接口继承
优雅的 Controller 层代码
I plan to take part in security work. How about information security engineers and how to prepare for the soft exam?
Network engineer test questions and answers in May of the first half of 2022
Those confusing concepts (3): function and class
Gym installation pit records
String formatting
Find the root of equation ax^2+bx+c=0 (C language)
I'd rather say simple problems a hundred times than do complex problems once
Some online academic report websites and machine learning videos
软考一般什么时候出成绩呢?在线蹬?
[OneNote] can't connect to the network and can't sync the problem
CSAPP bomb lab parsing
【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘