can send TEXT message (we only support BINARY messages now)

This commit is contained in:
Benjamin Sergeant
2019-03-22 14:22:58 -07:00
parent d41b7f64e4
commit f029321664
5 changed files with 49 additions and 11 deletions

View File

@ -30,6 +30,13 @@ namespace ix
{
class Socket;
enum class SendMessageKind
{
Text,
Binary,
Ping
};
class WebSocketTransport
{
public:
@ -71,6 +78,8 @@ namespace ix
void poll();
WebSocketSendInfo sendBinary(const std::string& message,
const OnProgressCallback& onProgressCallback);
WebSocketSendInfo sendText(const std::string& message,
const OnProgressCallback& onProgressCallback);
WebSocketSendInfo sendPing(const std::string& message);
void close();
ReadyStateValues getReadyState() const;