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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cheerp test</title> | |
</head> | |
<body> | |
<script src="xmlHttpRequest.js"></script> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cheerp test</title> | |
</head> | |
<body> | |
<script src="xmlHttpRequest.js"></script> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cheerp test</title> | |
</head> | |
<body> | |
<script src="xmlHttpRequest.js"></script> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cheerp test</title> | |
</head> | |
<body> | |
<script src="xmlHttpRequest.js"></script> | |
</body> | |
</html> |
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
#include <cheerp/clientlib.h> | |
#include <cheerp/client.h> | |
using namespace client; | |
// webMain is the entry point for web applications written in Cheerp | |
void webMain() | |
{ | |
//Synchronous mode | |
client::XMLHttpRequest* xhr=new client::XMLHttpRequest(); | |
xhr->open("GET","/someurl",false); | |
xhr->send(); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cheerp test</title> | |
</head> | |
<body> | |
<canvas id="pongcanvas"></canvas> | |
<script src="pong.js"></script> | |
</body> |
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
// The cheerp/clientlib.h header contains declarations for the browser APIs | |
#include <cheerp/clientlib.h> | |
// webMain is the entry point for web applications written in Cheerp | |
void webMain() | |
{ | |
client::console.log("Hello, World Wide Web!"); | |
} |
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
#!/bin/bash \ | |
FILES=/root/*.proto | |
for f in $FILES | |
do | |
PB=$(echo $f | cut -d'/' -f3-) | |
protoc --plugin=/usr/local/bin/protoc-gen-go $PB --go_out=src/go | |
protoc $PB --cpp_out=src/cpp | |
protoc $PB --java_out=src/java | |
done |
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
#ifndef MULTIPLER_COAPCLIENY_HPP | |
#define MULTIPLER_COAPCLIENY_HPP | |
#include "mongoose.h" | |
#include <iostream> | |
#include <string> | |
#include <functional> | |
class CoapClient { | |
struct mg_mgr mgr; | |
struct mg_connection *nc; |
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
class CoapClient { | |
struct mg_mgr mgr; | |
struct mg_connection *nc; | |
std::string address{"udp://127.0.0.1:5683"}; | |
public: | |
static int s_time_to_exit; | |
CoapClient() { | |
std::cout << "[Client] Using %s as CoAP server" << address << std::endl; | |
mg_mgr_init(&mgr, 0); |