24小时一体机服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
588 B

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace _24Hour.Controllers.Common
{
[Authorize]
public class WebSocketController : Controller
{
[HttpGet("/ws")]
public async Task WebSocketServer()
{
if (HttpContext.WebSockets.IsWebSocketRequest)
{
try
{
var socket = await HttpContext.WebSockets.AcceptWebSocketAsync();
}
catch (Exception ex)
{
}
}
}
}
}