Spark-Websockets (community library)

Summary

Name Value
Name Spark-Websockets
Version 0.0.7
Installs 6728
License MIT
Author Ivan Davletshin ekbduffy@gmail.com and Austin Kurpuis
URL https://github.com/ekbduffy/spark_websockets
Repository https://github.com/ekbduffy/spark_websockets.git
Download .tar.gz
All Versions 0.0.7, 0.0.6, 0.0.3, 0.0.2

Spark Library to work with websockets

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.

spark_websockets

Websockets implementation for Spark Core, ported from Arduino WebSocketClient

How to use :

#include Spark-Websockets/Spark-Websockets.h

WebSocketClient client;


void onMessage(WebSocketClient client, char* message) {
Serial.print("Received: ");
Serial.println(message);
}


/* This function is called once at start up ----------------------------------*/
void setup()
{
Serial.begin(9600);
while(!Serial.available()); // Wait here until the user presses ENTER in the Serial Terminal

client.onMessage(onMessage);
client.connect("echo.websocket.org");
}

void loop()
{
client.monitor();
delay(3000);
client.send("Hello World!");
}

Browse Library Files