using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ChatRoomServer.Main { using FSLib.Network.SuperSocket.Protocols.WebSocket; class ChatSession : WebSocketSession { /// /// 命令 /// public string Command { get; private set; } /// /// ID /// public string Id { get; private set; } /// /// Called when [init]. /// protected override void OnInit() { base.OnInit(); var path = Path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if (path.Length >= 2) { Command = path[0]; Id = path[1]; } } } }