C client for socket.io

2019-02-19 06:52发布

问题:

I am trying to establish a connection from a program in C to a node server with socket.io.

The only way I could figure out was to make http request from the C program to the node server so I have dis part a little covered.

Now I need to receive some information from the node server from the C program.

Is there any client library for c that lets me do this? In case it does not exist, could you gime me some ideas to make it work?

Thank you very much!

回答1:

You can also try cellophane.io:

https://github.com/ikeralbeniz/cellophane.io

it is still buggy so it is only fot testing or POCs..



回答2:

If you are looking for a library and examples try libwebsockets

It has both client and server capability and I hope it should help you out well with its documentations and examples.



回答3:

Can you use C++ instead? If so,

https://github.com/ebshimizu/socket.io-clientpp



回答4:

New C++ Client

Based on Boost and WebSocket++, this full-featured Socket.IO 1.0 client has the fundamental advantage of working on multiple platforms.

http://socket.io/blog/socket-io-cpp/