KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
websocket
★ 10
Open GitHub ↗
Simple C++ header only websocket library
Download README (.md)
Explore Similar Repositories
Human-Head-Detection
:
No description available.
esp32_p2layer
:
基于esp32的播放器
robot-animation
:
Its a robo friend so as you hover his head grows big and he can also dance,
starter-stack
:
Agent2D Starter Team Pack For Student's League
azure-functions-beginner-mar2020
:
An introduction to Azure functions in Python.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
websocket
?
Download (.md)
# Websocket - A header only websocket client library for C++ A simple header only library that implements a websocket client in c++ # Usage: See examples in the `./examples` directory. ``` #include <iostream> #include "websocket.hpp" void listen(char* data, int length) { printf("testing:%s\n",data); std::cout << length << std::endl; } int main() { websocket test; void (*listener)(char*, int) = listen; test.connectSocket("127.0.0.1", 8081, listen); test.sendMessage("testing:whatthebif"); std::cout << "Sent message" << std::endl; test.exit(); } ``` ### Compiling When compiling with `websocket.hpp`, make sure to link `pthread` and `OpenSSL` as this library uses these libraries to allow for sending and receiving of data at the same time, and for secure websockets. Using `g++` for example: ``` g++ yourFile.cpp -lpthread -lssl -o yourOutput ```