Booster currently working with single core and stick with the original idea of node.js behaviour single thread
http:{
base:{port:80,},
socket:{flag:true,port:8081},
},
https:{
flag:false,
base:{
port:443
},
certificate_path:"ssl_certificate",key:"localhost.com",certificate:"localhost.com",
socket_server_bind_port:8081,
socket:{
flag:true,
port:8081
}
},
Http & Https
Set socket flag true to use socket module
Client side server no need any extra configuration
jswalker_obj.booster({active:true},function(socket_op){
console.log('Booster activate');
/*Every Socket Prototype can be listed here*/
socket_op.prototype.test=function(pick,notifier){
console.log(op);
notifier({notify:true});
};
});
Note: jswalker_obj is standard object to access wir and booster module
active flag tell booster module to activate socket and other parameter is discarded by the booster module if active flag passed.
ProtoypeEvery Booster activation block is place for booster prototype which is directly used for communication via server.
require("jswalker-booster").booster({
system_op:system_op,
io:system_op.io,
sender:{
proto:"test",
ziel:{a:10}
},
notifier:function(pick){
console.log("Notify by browser");
console.log(pick);
}
});
system_op
Pass system_op for get io object
sender(me)current user by session
NotifierkThis is callback function when user call callback to respond server that getting data successfully this is optional
require("jswalker-booster").booster({
system_op:system_op,
group:{
name:"name_of_socket_group",
proto:"prototype_name",
ziel:{ziel_field:"ziel_value"}
}
});
system_op
Pass system_op for get io object
groupSpecify specific group via name of socket group and rest of parameter is same prototype name anf ziel data
NotifierNotifier not support in group event
Group socket module may later add notifier feature to track
which user notifier(crucial for future situation : race condition)
require("jswalker-booster").booster({
system_op:system_op,
broadcast:{
self:true,
proto:"prototype_name",
ziel:{ziel_field:"ziel_value"}
}
});
system_op
Pass system_op for get io object
broadcastAll connected socket will recieve message
NotifierNotifier not support in broadcast not in future too.
self is flag to send message sender or not