Commit bebfe7b7 authored by AlexStocks's avatar AlexStocks

enable js-client now

parent 9608d06e
......@@ -10,6 +10,11 @@
## develop history ##
---
- 2017/04/27
> improvement
* enable wss client just using cert file;
* js-client can connect wss server by allow-insecure-localhost (chrome://flags/#allow-insecure-localhost)
- 2016/11/19
> 1 add client/app/config.go:GettySessionParam{CompressEncoding} to test compress websocket compression extension.
>
......
// var serverAddress = '192.168.8.3:10000';
var serverAddress = '127.0.0.1:10000';
// var serverAddress = 'localhost:10000';
......@@ -40,11 +40,15 @@ $(function() {
var $chatPage = $('.chat.page'); // The chatroom page
// var socket = new WebSocket('ws://192.168.35.1:10000/echo');
var socket = new WebSocket('wss://' + serverAddress + '/echo', {
protocolVersion: 8,
// origin: 'https://' + serverAddress,
rejectUnauthorized: false
});
// var socket = new WebSocket('wss://' + serverAddress + '/echo', {
// // protocolVersion: 8,
// // origin: 'https://' + serverAddress,
// rejectUnauthorized: false,
// });
// http://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate#comment33762412_15076602
// chrome://flags/#allow-insecure-localhost
var socket = new WebSocket('wss://' + serverAddress + '/echo')
// // Setting binaryType to accept received binary as either 'blob' or 'arraybuffer'. In default it is 'blob'.
// socket.binaryType = 'arraybuffer';
// socket.binaryType = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment