Skip to content
hfuj13 edited this page Feb 2, 2017 · 22 revisions

Classes

WebSocket Timespec

API

lwsockcc::WebSocket#bind

  • WebSocket& bind(const std::string& uri, int af)
  • WebSocket& bind(const std::string& uri)

lwsockcc::WebSocket#listen

  • WebSocket& listen(int backlog)

lwsockcc::WebSocket#accept

  • WebSocket accept()
  • WebSocket accept(Sockaddr& remote)

lwsockcc::WebSocket#recv_req

  • handshake_t recv_req(const Timespec& timeout)
  • handshake_t recv_req()

lwsockcc::WebSocket#send_res

  • std::string send_res(const headers_t& otherheaders)
  • std::string send_res()

lwsockcc::WebSocket#send_res_manually

  • std::string send_res_manually(const handshake_t& handshake)

lwsockcc::WebSocket#path

  • std::string path()

lwsockcc::WebSocket#query

  • std::string query()

lwsockcc::WebSocket#origin

  • std::string origin()

lwsockcc::WebSocket#connect

  • WebSocket& connect(const std::string& uri, int af, const Timespec& timeout)
  • WebSocket& connect(const std::string& uri, const Timespec& timeout)
  • WebSocket& connect(const std::string& uri)

lwsockcc::WebSocket#send_req

  • std::string send_req(const headers_t& otherheaders)
  • std::string send_req()

lwsockcc::WebSocket#send_req_manually

  • std::string send_req_manually(const handshake_t& handshake)

lwsockcc::WebSocket#recv_res

  • std::pair<handshake_t, int32_t> recv_res(const Timespec& timeout)
  • std::pair<handshake_t, int32_t> recv_res()

lwsockcc::WebSocket#remote

  • Sockaddr remote()

lwsockcc::WebSocket#send_msg_txt

  • ssize_t send_msg_txt(const std::string& payload_data)

lwsockcc::WebSocket#send_msg_bin

  • ssize_t send_msg_bin(const std::vector<uint8_t>& payload_data)
  • template<size_t N> ssize_t send_msg_bin(const std::array<uint8_t, N>& payload_data)

lwsockcc::WebSocket#recv_msg_txt

  • std::pair<std::string, int32_t> recv_msg_txt(const Timespec& timeout)
  • std::pair<std::string, int32_t> recv_msg_txt()

lwsockcc::WebSocket#recv_msg_bin

  • std::pair<std::vector<uint8_t>, int32_t> recv_msg_bin(const Timespec& timeout)
  • std::pair<std::vector<uint8_t>, int32_t> recv_msg_bin()

lwsockcc::WebSocket#send_ping

  • ssize_t send_ping(const std::string& app_data)
  • ssize_t send_ping(const std::vector<uint8_t>& app_data)
  • template<size_t N> ssize_t send_ping(const std::array<uint8_t, N>& app_data)
  • ssize_t send_ping()

lwsockcc::WebSocket#send_pong

  • ssize_t send_pong(const std::string& app_data)
  • ssize_t send_pong(const std::vector<uint8_t>& app_data)
  • template<size_t N> ssize_t send_pong(const std::array<uint8_t, N>& app_data)
  • ssize_t send_pong()

lwsockcc::WebSocket#send_close

  • void send_close(const uint16_t status_code, const std::string& reason, const Timespec& timeout)
  • void send_close(const uint16_t status_code, const std::string& reason)
  • void send_close(const uint16_t status_code)

lwsockcc::WebSocket#sfd_ref

  • int sfd_ref()

lwsockcc::WebSocket#sfd_mv

  • int sfd_mv()

lwsockcc::WebSocket#ostream4log

  • WebSocket& ostream4log(std::ostream& ost)

lwsockcc::WebSocket#loglevel

  • WebSocket& loglevel(Log::Level lvl)
  • Log::Level loglevel()
Clone this wiki locally