protected void ExecuteCommand(WebSocketCommandInfo commandInfo) { if (m_CommandDict.TryGetValue(commandInfo.Key, out ICommand <WebSocket, WebSocketCommandInfo> value)) { value.ExecuteCommand(this, commandInfo); } }
// Token: 0x06000540 RID: 1344 RVA: 0x00018230 File Offset: 0x00016430 protected void ExecuteCommand(WebSocketCommandInfo commandInfo) { ICommand <WebSocket, WebSocketCommandInfo> command; if (this.m_CommandDict.TryGetValue(commandInfo.Key, out command)) { command.ExecuteCommand(this, commandInfo); } }
// Token: 0x06000541 RID: 1345 RVA: 0x0001825C File Offset: 0x0001645C private void OnDataReceived(byte[] data, int offset, int length) { for (;;) { int num; WebSocketCommandInfo commandInfo = this.CommandReader.GetCommandInfo(data, offset, length, out num); if (this.CommandReader.NextCommandReader != null) { this.CommandReader = this.CommandReader.NextCommandReader; } if (commandInfo != null) { this.ExecuteCommand(commandInfo); } if (num <= 0) { break; } offset = offset + length - num; length = num; } }
private void OnDataReceived(byte[] data, int offset, int length) { while (true) { int left; WebSocketCommandInfo commandInfo = CommandReader.GetCommandInfo(data, offset, length, out left); if (CommandReader.NextCommandReader != null) { CommandReader = CommandReader.NextCommandReader; } if (commandInfo != null) { ExecuteCommand(commandInfo); } if (left > 0) { offset = offset + length - left; length = left; continue; } break; } }