public Task Send(
            [FromBody] HttpInput input)
        {
            var send = _mahuaCenter.HandleMahuaInput(input);

            return(send);
        }
        public async Task Start()
        {
            var buffer = new byte[1024 * 4];
            var recyclableMemoryStreamManager = new RecyclableMemoryStreamManager();
            WebSocketReceiveResult result     = null;

            do
            {
                string inputString;
                using (var stream = recyclableMemoryStreamManager.GetStream())
                {
                    do
                    {
                        result = await _webSocket.ReceiveAsync(new ArraySegment <byte>(buffer), CancellationToken.None);

                        await stream.WriteAsync(buffer, 0, result.Count);
                    } while (!result.EndOfMessage);

                    inputString = Encoding.UTF8.GetString(stream.ToArray());
                }

                if (!string.IsNullOrEmpty(inputString))
                {
                    var input = JsonConvert.DeserializeObject <WebsocketInput>(inputString);
                    await _mahuaCenter.HandleMahuaInput(input);
                }
            } while (!result.CloseStatus.HasValue);


            await _webSocket.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription,
                                        CancellationToken.None);
        }