Added NightAlert project for travel kit
This commit is contained in:
2
ThirdParty/SocketIoClientDotNet/TestServer/.gitignore
vendored
Normal file
2
ThirdParty/SocketIoClientDotNet/TestServer/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
test.xml
|
||||
16
ThirdParty/SocketIoClientDotNet/TestServer/.jshintrc
vendored
Normal file
16
ThirdParty/SocketIoClientDotNet/TestServer/.jshintrc
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"node": true,
|
||||
"devel": true,
|
||||
"indent": 2,
|
||||
"maxerr": 50,
|
||||
"newcap": true,
|
||||
"nomen": true,
|
||||
"plusplus": false,
|
||||
"regexp": true,
|
||||
"white": false,
|
||||
"curly": true,
|
||||
"eqnull": true,
|
||||
"eqeqeq": true,
|
||||
"undef": true
|
||||
|
||||
}
|
||||
35
ThirdParty/SocketIoClientDotNet/TestServer/index.html
vendored
Normal file
35
ThirdParty/SocketIoClientDotNet/TestServer/index.html
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Socket.IO chat</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font: 13px Helvetica, Arial; }
|
||||
form { background: #000; padding: 3px; position: fixed; bottom: 0; width: 100%; }
|
||||
form input { border: 0; padding: 10px; width: 90%; margin-right: .5%; }
|
||||
form button { width: 9%; background: rgb(130, 224, 255); border: none; padding: 10px; }
|
||||
#messages { list-style-type: none; margin: 0; padding: 0; }
|
||||
#messages li { padding: 5px 10px; }
|
||||
#messages li:nth-child(odd) { background: #eee; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<ul id="messages"></ul>
|
||||
<form action="">
|
||||
<input id="m" autocomplete="off" /><button>Send</button>
|
||||
</form>
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
|
||||
<script>
|
||||
var socket = io();
|
||||
$('form').submit(function(){
|
||||
socket.emit('chat message', $('#m').val());
|
||||
$('#m').val('');
|
||||
return false;
|
||||
});
|
||||
socket.on('chat message', function(msg){
|
||||
$('#messages').append($('<li>').text(msg));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
12
ThirdParty/SocketIoClientDotNet/TestServer/package.json
vendored
Normal file
12
ThirdParty/SocketIoClientDotNet/TestServer/package.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "socket.io-client.testserver",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"express": "^4.15.2",
|
||||
"socket.io": "^1.7.3",
|
||||
"expect": "^1.20.2",
|
||||
"expect.js": "^0.3.1",
|
||||
"utf8": "^2.1.2"
|
||||
}
|
||||
}
|
||||
216
ThirdParty/SocketIoClientDotNet/TestServer/server.js
vendored
Normal file
216
ThirdParty/SocketIoClientDotNet/TestServer/server.js
vendored
Normal file
@@ -0,0 +1,216 @@
|
||||
var
|
||||
ssl = true,
|
||||
express = require('express'),
|
||||
expect = require('expect.js'),
|
||||
util = require('util'),
|
||||
config = require('./../grunt/config.json'),
|
||||
test_data = require('./test_data.json'),
|
||||
utf8 = require('utf8'),
|
||||
app = express(),
|
||||
fs = require('fs'),
|
||||
options = {
|
||||
key: fs.readFileSync(__dirname + '/testme.quobject.com.key'),
|
||||
cert: fs.readFileSync(__dirname + '/testme.quobject.com.cert'),
|
||||
requestCert: true
|
||||
},
|
||||
io,
|
||||
io_ssl,
|
||||
https,
|
||||
http,
|
||||
slice = Array.prototype.slice;
|
||||
|
||||
|
||||
console.log("https port = " + config.server.ssl_port);
|
||||
https = require('https').createServer(options, app);
|
||||
io_ssl = require('socket.io')(https, { pingInterval: 500 });
|
||||
https.listen(config.server.ssl_port, function (d) {
|
||||
console.log('socket.io server listening on port', config.server.ssl_port);
|
||||
});
|
||||
|
||||
console.log("http port = " + config.server.port);
|
||||
http = require('http').createServer(app);
|
||||
io = require('socket.io')(http, { pingInterval: 500 });
|
||||
http.listen(config.server.port, function () {
|
||||
console.log('socket.io server listening on port', config.server.port);
|
||||
});
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.sendfile('index.html');
|
||||
});
|
||||
|
||||
io.on('connection', function(socket) {
|
||||
socket.emit('hi', 'more data');
|
||||
|
||||
socket.on('hi2', function(d) {
|
||||
|
||||
console.log("hi2" + d);
|
||||
socket.emit('hi2back', 'more data');
|
||||
});
|
||||
|
||||
// simple test
|
||||
socket.on('hi', function(d) {
|
||||
console.log("hi" + d);
|
||||
socket.emit('hi', 'more data');
|
||||
});
|
||||
|
||||
//ogs test
|
||||
socket.on('parser_error#21', function(d) {
|
||||
console.log("ogs test" + d);
|
||||
socket.emit('parser_error#21_response', test_data.ogstestchars);
|
||||
});
|
||||
|
||||
socket.on('d10000chars', function() {
|
||||
console.log('d10000chars');
|
||||
socket.emit('d10000chars', test_data.d10000chars);
|
||||
});
|
||||
|
||||
|
||||
socket.on('d100000chars', function() {
|
||||
console.log('d100000chars');
|
||||
socket.emit('d100000chars', test_data.d100000chars);
|
||||
});
|
||||
|
||||
|
||||
socket.on('json10000chars', function() {
|
||||
console.log('json10000chars');
|
||||
socket.emit('json10000chars', { data: test_data.d10000chars });
|
||||
});
|
||||
|
||||
socket.on('json10000000chars', function() {
|
||||
console.log('json10000000chars');
|
||||
socket.emit('json10000000chars', {
|
||||
data: test_data.d10000000chars,
|
||||
data2: test_data.d100000chars,
|
||||
data3: test_data.d100000chars,
|
||||
data4: { data5: test_data.d100000chars }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
socket.on('latin', function(wsinput) {
|
||||
console.log('issue24 socket.on latin');
|
||||
socket.emit('latin', { 'error': 'Nombre de usuario o contraseña incorrecta.' });
|
||||
});
|
||||
|
||||
socket.on('nolatin', function(wsinput) {
|
||||
console.log('issue24 sockect.on no latin');
|
||||
socket.emit('nolatin', { 'error': 'Nombre de usuario o contrasena incorrecta.' });
|
||||
});
|
||||
|
||||
socket.on('get_cookie', function() {
|
||||
console.log(util.inspect(socket.handshake.headers.cookie));
|
||||
socket.emit('got_cookie', socket.handshake.headers.cookie);
|
||||
});
|
||||
|
||||
// ack tests
|
||||
socket.on('ack', function() {
|
||||
socket.emit('ack', function(a, b) {
|
||||
console.log("emit ack b=" + JSON.stringify(b));
|
||||
if (a === 5 && b.b === true) {
|
||||
socket.emit('got it');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('ack2', function() {
|
||||
socket.emit('ack2', 'hello there', function(a, b) {
|
||||
console.log("emit ack2 b=" + JSON.stringify(b));
|
||||
if (a === 5 && b.b === true) {
|
||||
socket.emit('got it');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('getAckDate', function(data, cb) {
|
||||
cb(new Date(), 5);
|
||||
});
|
||||
|
||||
socket.on('getDate', function() {
|
||||
socket.emit('takeDate', new Date());
|
||||
});
|
||||
|
||||
socket.on('getDateObj', function() {
|
||||
socket.emit('takeDateObj', { date: new Date() });
|
||||
});
|
||||
|
||||
socket.on('getUtf8', function() {
|
||||
socket.emit('takeUtf8', 'てすと');
|
||||
socket.emit('takeUtf8', 'Я Б Г Д Ж Й');
|
||||
socket.emit('takeUtf8', 'Ä ä Ü ü ß');
|
||||
socket.emit('takeUtf8', '李O四');
|
||||
socket.emit('takeUtf8', 'utf8 — string');
|
||||
});
|
||||
|
||||
// false test
|
||||
socket.on('false', function() {
|
||||
socket.emit('false', false);
|
||||
});
|
||||
|
||||
// binary test
|
||||
socket.on('doge', function() {
|
||||
var buf = new Buffer('asdfasdf', 'utf8');
|
||||
socket.emit('doge', buf);
|
||||
});
|
||||
|
||||
// expect receiving binary to be buffer
|
||||
socket.on('buffa', function(a) {
|
||||
if (Buffer.isBuffer(a)) {
|
||||
socket.emit('buffack');
|
||||
}
|
||||
});
|
||||
|
||||
// expect receiving binary with mixed JSON
|
||||
socket.on('jsonbuff', function(a) {
|
||||
expect(a.hello).to.eql('lol');
|
||||
expect(Buffer.isBuffer(a.message)).to.be(true);
|
||||
expect(a.goodbye).to.eql('gotcha');
|
||||
socket.emit('jsonbuff-ack');
|
||||
});
|
||||
|
||||
// expect receiving buffers in order
|
||||
var receivedAbuff1 = false;
|
||||
socket.on('abuff1', function(a) {
|
||||
expect(Buffer.isBuffer(a)).to.be(true);
|
||||
receivedAbuff1 = true;
|
||||
});
|
||||
socket.on('abuff2', function(a) {
|
||||
expect(receivedAbuff1).to.be(true);
|
||||
socket.emit('abuff2-ack');
|
||||
});
|
||||
|
||||
// emit buffer to base64 receiving browsers
|
||||
socket.on('getbin', function() {
|
||||
var buf = new Buffer('asdfasdf', 'utf8');
|
||||
socket.emit('takebin', buf);
|
||||
});
|
||||
|
||||
// simple test
|
||||
socket.on('test', function(d) {
|
||||
var s1 = "test" + d;
|
||||
console.log(s1);
|
||||
fs.appendFileSync('test.txt', s1);
|
||||
socket.emit('hi', 'more data');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
io.of('/foo').on('connection', function () {
|
||||
// register namespace
|
||||
});
|
||||
|
||||
io.of('/timeout_socket').on('connection', function () {
|
||||
// register namespace
|
||||
});
|
||||
|
||||
io.of('/valid').on('connection', function () {
|
||||
// register namespace
|
||||
});
|
||||
|
||||
io.of('/asd').on('connection', function () {
|
||||
// register namespace
|
||||
});
|
||||
|
||||
io_ssl.on('connection', function (socket) {
|
||||
|
||||
});
|
||||
|
||||
1
ThirdParty/SocketIoClientDotNet/TestServer/test.txt
vendored
Normal file
1
ThirdParty/SocketIoClientDotNet/TestServer/test.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
testcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקהtestcsdataてすとבדיקה
|
||||
12
ThirdParty/SocketIoClientDotNet/TestServer/test_data.json
vendored
Normal file
12
ThirdParty/SocketIoClientDotNet/TestServer/test_data.json
vendored
Normal file
File diff suppressed because one or more lines are too long
19
ThirdParty/SocketIoClientDotNet/TestServer/testme.quobject.com.cert
vendored
Normal file
19
ThirdParty/SocketIoClientDotNet/TestServer/testme.quobject.com.cert
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDDzCCAfegAwIBAgIJANW6WUwZpQs+MA0GCSqGSIb3DQEBBQUAMB4xHDAaBgNV
|
||||
BAMME3Rlc3RtZS5xdW9iamVjdC5jb20wHhcNMTQwODI2MTkwMDQzWhcNMjQwODIz
|
||||
MTkwMDQzWjAeMRwwGgYDVQQDDBN0ZXN0bWUucXVvYmplY3QuY29tMIIBIjANBgkq
|
||||
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtJCU+74bnPPYg0SPBCws1WYdT7+lXDaf
|
||||
IZdCLXU3RT/hAszD/Hi8oCijD1BvfjRcPr9XAqKBWMeLTorV8YL/I5g+5Nzmcaep
|
||||
LjnmQV3YDR+ioBfx+PRwF8gx/ZGdmK/hcoFq27xbF6cLI4mbvddlwUdKEGgZ+g/a
|
||||
B+CzFF9xCKoll6zqnnHS+DImGNbH4+ex33vQj4yoQrRT5E85s7/nSwvbDve+AlJ3
|
||||
ChJVod4kepwixhV90ENP0u65lpgi7ipIDCNxtf/7ZazsSj33eSKioz3xy2mFX7WO
|
||||
Fqtg1f3h/njH4uI6RkPUbuFyj3IOqv6OQwbl7NXbzuPfkmGC7QBGqwIDAQABo1Aw
|
||||
TjAdBgNVHQ4EFgQUE28o7tGA1Aw53KhiC0PyTDlA29EwHwYDVR0jBBgwFoAUE28o
|
||||
7tGA1Aw53KhiC0PyTDlA29EwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
|
||||
AQEAqbOxXwelUcV9psZl8fr+FIbkl5/mLqZV1RdrHCkUD2OwGH5M8AlCqj42hmxi
|
||||
n6KIgE45MOo9UYHWNQ1Aem3ziEGPRDVZpsoNW1GfG6XnAH5r1DK34Td7lU1JebNN
|
||||
hxqV3AfVfeqrW1ZOmqEFJ95VwCoN1RPPh3MgFI1zjOjEJyk0pPxFNFRtpIHfLgve
|
||||
TFe88aVMAbDLVzGyDkkS2DxNvyZ5153W3JRh2u8PqhLSzCIGF+IcCOrwZya+VC63
|
||||
wWg8AckPXIGmhU/6P4zdQ/WCZ/tqErFYls49zwp6xAfvvfdTbqYCSNyOqsTKbYyP
|
||||
qAd5L9YKITYYa8IupRyIJGbXnw==
|
||||
-----END CERTIFICATE-----
|
||||
27
ThirdParty/SocketIoClientDotNet/TestServer/testme.quobject.com.key
vendored
Normal file
27
ThirdParty/SocketIoClientDotNet/TestServer/testme.quobject.com.key
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEAtJCU+74bnPPYg0SPBCws1WYdT7+lXDafIZdCLXU3RT/hAszD
|
||||
/Hi8oCijD1BvfjRcPr9XAqKBWMeLTorV8YL/I5g+5NzmcaepLjnmQV3YDR+ioBfx
|
||||
+PRwF8gx/ZGdmK/hcoFq27xbF6cLI4mbvddlwUdKEGgZ+g/aB+CzFF9xCKoll6zq
|
||||
nnHS+DImGNbH4+ex33vQj4yoQrRT5E85s7/nSwvbDve+AlJ3ChJVod4kepwixhV9
|
||||
0ENP0u65lpgi7ipIDCNxtf/7ZazsSj33eSKioz3xy2mFX7WOFqtg1f3h/njH4uI6
|
||||
RkPUbuFyj3IOqv6OQwbl7NXbzuPfkmGC7QBGqwIDAQABAoIBAQCy2/0YGUqVAF7a
|
||||
ONFKGtAWWt5yHq6YV2ruBT0CdnfXWt1yvo7sylReeaJ8CvtGEmvFpBd2fq6N2Ku/
|
||||
k3s1jsNY6Ph0D/UdZC0Lo0LYQTNAXLPk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Hkxt
|
||||
mmLE4+IrkhrWKQTW4vDAlIvTBZYJYeXZtu0IRilKccSExcKDhBmWhIDyFqRoyl3V
|
||||
OYmrskNT5YtBTEFKerAOKJ5LXxVQQ7k2YDz3uSli3NNsCMpfqo7Lxg==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
BIN
ThirdParty/SocketIoClientDotNet/TestServer/testme.quobject.com.p7b
vendored
Normal file
BIN
ThirdParty/SocketIoClientDotNet/TestServer/testme.quobject.com.p7b
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user