连接
是否连接
- C#
- JavaScript
namespace Serein.Core.Services.Network.Connection;
public partial class WsConnectionManager
{
public bool Active { get; }
}
serein.connection.active
- 类型
boolean
启动
- C#
- JavaScript
namespace Serein.Core.Services.Network.Connection;
public partial class WsConnectionManager
{
public void Start();
}
serein.connection.start(): void
- 若已连接则会报错,可用
try...catch
捕获