prepare more P2P pathing
parent
0dc4b7afd2
commit
8252886272
|
@ -301,6 +301,7 @@ $.ccio.globalWebsocket=function(d,user){
|
|||
uid: user.uid,
|
||||
ke: d.ke,
|
||||
id: d.id,
|
||||
subscriptionId: subscriptionId,
|
||||
// channel: channel
|
||||
})
|
||||
if(!$.ccio.mon[d.ke+d.id+user.auth_token].ctx||$.ccio.mon[d.ke+d.id+user.auth_token].ctx.length===0){
|
||||
|
|
|
@ -102,9 +102,15 @@
|
|||
<script><% include ../libs/js/bootstrap-table.min.js %></script>
|
||||
<script>
|
||||
$.ccio={subs:{}};$.ls=localStorage;
|
||||
$.ccio.ws=io(location.origin,{
|
||||
path : tool.checkCorrectPathEnding(location.pathname)+'socket.io'
|
||||
});
|
||||
if(location.search === '?assemble=1'){
|
||||
$.ccio.ws=io(location.origin,{
|
||||
path : '/socket.io'
|
||||
});
|
||||
}else{
|
||||
$.ccio.ws=io(location.origin,{
|
||||
path : tool.checkCorrectPathEnding(location.pathname)+'socket.io'
|
||||
});
|
||||
}
|
||||
$.ccio.cx=function(x){if(!x.ke){x.ke=$user.ke;};if(!x.uid){x.uid=$user.uid;};return $.ccio.ws.emit('a',x)}
|
||||
$.ccio.ws.on('connect',function(d){
|
||||
$.ccio.cx({f:'init',auth:$user.auth_token});
|
||||
|
|
|
@ -229,9 +229,15 @@ switch($user.lang){
|
|||
})
|
||||
break;
|
||||
}
|
||||
$.ccio.ws=io(location.origin,{
|
||||
path : tool.checkCorrectPathEnding(location.pathname)+'socket.io'
|
||||
});
|
||||
if(location.search === '?assemble=1'){
|
||||
$.ccio.ws=io(location.origin,{
|
||||
path : '/socket.io'
|
||||
});
|
||||
}else{
|
||||
$.ccio.ws=io(location.origin,{
|
||||
path : tool.checkCorrectPathEnding(location.pathname)+'socket.io'
|
||||
});
|
||||
}
|
||||
$.ccio.cx=function(x){return $.ccio.ws.emit('super',x)}
|
||||
$.ccio.ws.on('connect',function(d){
|
||||
$.ccio.cx({f:'init',mail:$user.mail,pass:$user.pass})
|
||||
|
|
Loading…
Reference in New Issue