package com.ym.mec.web.controller;

import com.ym.mec.biz.handler.WebSocketHandler;
import com.ym.mec.common.controller.BaseController;
import com.ym.mec.common.entity.HttpResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Joburgess
 * @Date 2021/8/10 0010
 */
@Api(tags = "音频服务")
@RequestMapping("soundCompare")
@RestController
public class SoundCompareController extends BaseController {

    @ApiOperation(value = "获取在线人数")
    @GetMapping("getOnlineUserNum")
    public HttpResponseResult getOnlineUserNum(){
        return succeed(WebSocketHandler.WS_CLIENTS.size());
    }

}
