Join the Stack Overflow Community
Stack Overflow is a community of 6.4 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I want to make a WebSocket inner ESP8266 but i cant do it. I used this link for made it. https://github.com/billroy/socket.io-arduino-client I get error inner SocketIOClient.h

The error is:

In file included from C:\Users\WaffenSS\Desktop\ses\ses.ino:1:0:

C:\Program Files (x86)\Arduino\libraries\SocketIOClient/SocketIOClient.h:44:2: error: "Please specify an interface such as W5100, ENC28J60, or ESP8266"

C:\Program Files (x86)\Arduino\libraries\SocketIOClient/SocketIOClient.h:45:2: error: "above your includes like so : #define ESP8266 "

exit status 1 Error compiling for board Arduino/Genuino Uno.

There is anyone can help me ?

share|improve this question
    
So @Erdem, socket.io has little modifications than websockets. So follow up the answer. – cagdas 2 days ago

Socket.IO is an API for WebSockets and most of Websocket libraries are supporting it.

I am pretty happy with this most contributed Arduino WebSocket library and it also supports Socket.IO. Here is your Socket.IO example.

Here is a heartbeat message type of socket.io implementaiton from the example:

if((now - heartbeatTimestamp) > HEARTBEAT_INTERVAL) {
    heartbeatTimestamp = now;
    // socket.io heartbeat message
    webSocket.sendTXT("2");
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.