当前位置:网站首页>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
边栏推荐
猜你喜欢
I plan to take part in security work. How about information security engineers and how to prepare for the soft exam?
Using U2 net deep network to realize -- certificate photo generation program
ADB utility commands (network package, log, tuning related)
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
MONAI版本更新到 0.9 啦,看看有什么新功能
[machine learning 03] Lagrange multiplier method
单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
leetcode-304:二维区域和检索 - 矩阵不可变
How to successfully pass the senior system architecture designer in the second half of the year?
Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
随机推荐
Deep understanding of Apache Hudi asynchronous indexing mechanism
Long list performance optimization scheme memo
String formatting
leetcode-304:二维区域和检索 - 矩阵不可变
IIC Basics
高级软考(网络规划设计师)该如何备考?
CSAPP Bomb Lab 解析
The gun startles the dragon, and the crowd "locks" Zhou Zhi
The difference between monotonicity constraint and anti monotonicity constraint
使用U2-Net深层网络实现——证件照生成程序
Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
软考一般什么时候出成绩呢?在线蹬?
在线硬核工具
【作业】2022.7.6 写一个自己的cal函数
Cluster task scheduling system lsf/sge/slurm/pbs based on HPC scenario
A simple example of delegate usage
Multisim -- software related skills
Basic introduction of yarn and job submission process
2022.7.4DAY596
TypeScript 接口继承