using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace web.Controllers {
[Route("ws")]
public class WebSocketController : Controller {
public string Ip => this.Request.Headers["X-Real-IP"].FirstOrDefault() ?? this.Request.HttpContext.Connection.RemoteIpAddress.ToString();
///
/// 获取websocket分区
///
/// 本地标识,若无则不传,接口会返回新的,请保存本地localStoregy重复使用
///
[HttpPost("pre-connect")]
async public Task