/// <summary> /// Sends data to the client with the text message type /// </summary> /// <param name="buffer">Data to send</param> /// <param name="endOfMessage">End of the message?</param> /// <returns>Task to send the data</returns> public Task SendText(ArraySegment <byte> buffer, bool endOfMessage) { return(mWebSocket.SendText(buffer, endOfMessage, mCancellToken.Token)); }
/// <summary> /// Sends data to the client with the text message type /// </summary> /// <param name="buffer">Data to send</param> /// <param name="endOfMessage">End of the message?</param> /// <returns>Task to send the data</returns> public Task SendText(ArraySegment <byte> buffer, bool endOfMessage) { return(mWebSocket.SendText(buffer, endOfMessage, CancellationToken.None)); }
/// <inheritdoc /> public void Open() => WebSocket.SendText("Now open! Enter some C#!");
/// <summary> /// This method is called when the WebSocket is opened towards this Chatbot instance. A perfect /// time to send a welcome message. /// </summary> public void Open() => WebSocket.SendText( "> Hi, I'm a chatbot! Type anything, and I'll try my best to answer. I like to tell jokes... " + "(type QUIT to return to the shell)" );