timum-viw / socket.io-client

A socket.io-client implementation for ESP8266 and Arduino
228 stars 90 forks source link

Is it possible to run it on ArduinoUno ? #92

Closed FixerCy closed 3 years ago

FixerCy commented 4 years ago

Hello, I would like to use WiFiEsp.h library combined by SocketIoClient

Currently I am experiencing the following compilation error: `....\Arduino\libraries\SocketIoClient/SocketIoClient.h:5:10: fatal error: map: No such file or directory

include

` I tried the "-lstdc++" addition to C:\Program Files (x86)\Arduino\hardware\arduino\avr\platform.txt but it did not fix the problem

Is it possible to run it on Arduino using WiFiEsp.h altogether?

FixerCy commented 4 years ago

Using arduino library ArxContainer (available at library manager) I just edited SocketIoClient.h file by replacing all std references to arx, for example:

std::vector replaced by arx::vector std::map replaced by arx::map

at now it seems to accept it...

but I currently stuck at this: std::function error since it has no arx implementation yet: arx::map<String, std::function<void (const char * payload, size_t length)>> _events; error: ...\Documents\Arduino\libraries\SocketIoClient/SocketIoClient.h:29:24: error: 'function' is not a member of 'std' arx::map<String, std::function<void (const char * payload, size_t length)>> _events;

Is there a way to replace std::function by something that would be easier to digest by Arduino/arx ?