Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
http: provide websocket method for sending strings
  • Loading branch information
linev committed Apr 18, 2017
commit 2d7951a3f092e2264842c5148ad8f784aed9f11d
2 changes: 2 additions & 0 deletions net/http/inc/THttpEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class THttpWSEngine : public TNamed {

virtual void Send(const void *buf, int len) = 0;

virtual void SendCharStar(const char *str);

virtual void ProcessData(THttpCallArg *arg);

// --------- method to work with Canvas (temporary solution)
Expand Down
8 changes: 8 additions & 0 deletions net/http/src/THttpEngine.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ void THttpWSEngine::ProcessData(THttpCallArg *arg)
}
}

////////////////////////////////////////////////////////////////////////////////
/// Envelope for sending string via the websocket

void THttpWSEngine::SendCharStar(const char *str)
{
if (str) Send(str, strlen(str));
}

////////////////////////////////////////////////////////////////////////////////
/// assign canvas to the web socket
/// connects with CanvasModified signal
Expand Down