Comments (3)
README: add a list of C, C++ WebSocket libraries
from deepstream.io-client-cpp.
Initially, I decided to use WebSocket++ because
- header-only,
- BSD or Boost license,
- single purpose, and
- many stars and forks on GitHub.
WebSocket++ immediately revealed a few code smells: - holey documentation,
- manual initialization in a language with constructors ([example)[https://github.com/zaphoyd/websocketpp/blob/378437aecdcb1dfe62096ffd5d944bf1f640ccc3/examples/scratch_client/scratch_client.cpp#L119-L120]),
- implementation-dependent initialization although templates are used (see previous example).
With POCO C++ libraries, setting up a client takes four (or six short) lines of code.
from deepstream.io-client-cpp.
Can you also mention the interface you are going for when integrating the websocket library?
Since all websocket libraries use the
open
close
error
message
callbacks I would recommend something along the lines of ( in total pseduo code):
create( String: url to connect to )
open()
close()
send(String: as a string message)
onOpen(handler) -> handler call doesn't need arguments
onClose(handler) -> handler call doesn't need arguments
onError(handler) -> error message argument
onMessage(handler) -> Single string message argument
Integration wise, I would inject it into the connection class when the client is first created. This will give the connection class full control, and passing the connection class around is better than the entire client since it has a subset of functionality and stops unrequired methods being potentially exposed on the client object.
from deepstream.io-client-cpp.
Related Issues (20)
- Make core client work using WSHandler
- Write a deepstream serializer/deserializer
- Write a library C++ wrapper to login HOT 1
- Make login non sync
- Write a library C++ wrapper for events
- Write a library C++ wrapper for presence
- Don't use function pointers when subscribing
- reword clientImpl -> connection HOT 1
- Make reconnecting async
- add /deepstream to url if not present HOT 1
- .debug() function for displaying all local subscriptions
- travis pipeline for various linux distros
- Pass in a Map as a second argument to client for configuration options
- re-subscribe presence after reconnect HOT 1
- Connection reconnects considerations
- Login callback behaviour needs to be reviewed HOT 1
- Reduce copying in EventWrapper API
- Clarify 'Client' naming
- Windows compile HOT 4
- Fix MacOS build HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepstream.io-client-cpp.