WebCFace 2.5.2
Web-based Communication Framework & Dashboard-like UI
Loading...
Searching...
No Matches
client_ws.h
Go to the documentation of this file.
1#pragma once
3
5namespace internal {
6namespace WebSocket {
7
16void init(const std::shared_ptr<internal::ClientData> &data);
21void close(const std::shared_ptr<internal::ClientData> &data);
28bool recv(const std::shared_ptr<internal::ClientData> &data,
29 const std::function<void(std::string &&)> &cb);
34void send(const std::shared_ptr<internal::ClientData> &data,
35 const std::string &msg);
36
37} // namespace WebSocket
38} // namespace internal
void close(const std::shared_ptr< internal::ClientData > &data)
切断しhandleをfreeする
Definition client_ws.cc:124
void init(const std::shared_ptr< internal::ClientData > &data)
WebSocketに接続する
Definition client_ws.cc:42
bool recv(const std::shared_ptr< internal::ClientData > &data, const std::function< void(std::string &&)> &cb)
messageを1回受信しdata->onRecvを呼ぶ
Definition client_ws.cc:132
void send(const std::shared_ptr< internal::ClientData > &data, const std::string &msg)
メッセージを送信する
Definition client_ws.cc:187
#define WEBCFACE_NS_END
Definition webcface-config.h:113
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:112