public ActionResult <JsonResponses> PreConnect([FromForm] string appId, [FromForm] string userId, [FromForm] Guid?websocketId) { if (websocketId == null) { websocketId = Guid.NewGuid(); } ClientVo clientVo = new ClientVo() { AppId = appId, UserId = userId, AppIp = this.Ip, }; var wsserver = WebSocketProxyAgent.PrevConnectServer(websocketId.Value, JsonConvert.SerializeObject(clientVo)); return(new JsonResponses(new ConnectVo() { Server = wsserver, WebsocketId = websocketId })); }
public ActionResult <JsonResponses> SendChannelMessage([FromForm] Guid websocketId, [FromForm] string channel, [FromForm] string message) { WebSocketProxyAgent.SendChannelMessage(websocketId, channel, message); return(JsonResponses.Success); }
public ActionResult <JsonResponses> SubscrChannel([FromForm] Guid websocketId, [FromForm] string channel) { WebSocketProxyAgent.SubscribeChannel(websocketId, channel); return(JsonResponses.Success); }
public ActionResult <JsonResponses> GetChannels() { List <OnlineChannelVo> onlineChannelVos = WebSocketProxyAgent.GetChannelList().ToList(); return(new JsonResponses(onlineChannelVos)); }