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