Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
新增websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed May 31, 2016
1 parent af5e7bb commit d1f4f4a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Socket.open = function (func) {
if (func)func(Socket);
};
Socket.__proxy.onerror = function (msg) {
Socket.closed=true;
console.log(msg);
};
Socket.__proxy.onclose = function (msg) {
Expand Down Expand Up @@ -74,6 +75,7 @@ Socket.open = function (func) {

function getSocket(win) {
if (win.__Socket) {
if(win.__Socket.closed)return null;
return win.__Socket;
} else {
if (win.parent != win) {
Expand Down

0 comments on commit d1f4f4a

Please sign in to comment.