Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mikhail Grigorev <sleuthhound@gmail.com>
- Loading branch information
Showing
35 changed files
with
715 additions
and
4,324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<!DOCTYPE html> | ||
|
||
<meta charset="utf-8" /> | ||
|
||
<title>WebSocket Test</title> | ||
|
||
<script language="javascript" type="text/javascript"> | ||
|
||
var wsUri = "ws://"+window.location.host+"/websocket/ws.cgi"; | ||
var output; | ||
|
||
function init() | ||
{ | ||
output = document.getElementById("output"); | ||
testWebSocket(); | ||
} | ||
|
||
function testWebSocket() | ||
{ | ||
websocket = new WebSocket(wsUri); | ||
websocket.onopen = function(evt) { onOpen(evt) }; | ||
websocket.onclose = function(evt) { onClose(evt) }; | ||
websocket.onmessage = function(evt) { onMessage(evt) }; | ||
websocket.onerror = function(evt) { onError(evt) }; | ||
} | ||
|
||
function onOpen(evt) | ||
{ | ||
writeToScreen("CONNECTED"); | ||
doSend("WebSocket rocks"); | ||
} | ||
|
||
function onClose(evt) | ||
{ | ||
writeToScreen("DISCONNECTED"); | ||
} | ||
|
||
function onMessage(evt) | ||
{ | ||
writeToScreen('<span style="color: blue;">RECEIVED: ' + evt.data+'</span>'); | ||
// websocket.close(); | ||
} | ||
|
||
function onError(evt) | ||
{ | ||
writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data); | ||
} | ||
|
||
function doSend(message) | ||
{ | ||
writeToScreen("SENT: " + message); | ||
websocket.send(message); | ||
} | ||
|
||
function writeToScreen(message) | ||
{ | ||
var pre = document.createElement("p"); | ||
pre.style.wordWrap = "break-word"; | ||
pre.innerHTML = message; | ||
output.appendChild(pre); | ||
} | ||
|
||
window.addEventListener("load", init, false); | ||
|
||
</script> | ||
|
||
<h2>WebSocket Test</h2> | ||
|
||
<div id="output"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1 @@ | ||
#ifndef __USER_CONFIG_H__ | ||
#define __USER_CONFIG_H__ | ||
|
||
#define USE_WIFI_MODE STATIONAP_MODE | ||
#define WIFI_CLIENTSSID "MYAP" | ||
#define WIFI_CLIENTPASSWORD "00000000" | ||
#define WIFI_AP_NAME "ESP8266" | ||
#define WIFI_AP_PASSWORD "00000000" | ||
#define PLATFORM_DEBUG true | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.