signalGo client version for javascript
signalGo client version for .Net framework
SignalGo is a library for Cross-Platform developers that makes it incredibly simple to add real-time web functionality to your applications. What is "real-time web" functionality? It's the ability to have your server-side code push content to the connected clients as it happens, in real-time. like WCF and SignalR
- Send and receive any data like class,object,parameters,methods,return types
- Return data from a method (client and server)
- Support priority system
- Support $id and $ref for json and objects
- Auto Reconnect and other fetures...
function Test() {
var provider = new ClientProvider();
var setting = new ConnectionSettings();
provider.InitializeConnectionSettings(setting);
var service = provider.RegisterService('HealthFamilyService', ['HelloWorld', 'Sum']);
//priority functions always run after connect before call anything
//this help you for login method etc
setting.addPriorityFunction(function () {
return service.HelloWorld("ali", function (x) {
console.log("priority: " + x);
});
});
setting.addPriorityFunction(function () {
return service.Sum(11, 12, function (x) {
console.log("priority: " + x);
});
});
provider.Connect('ws://localhost:9752/SignalGoTestService', provider, function () {
//after connect
//HealthFamilyService is your service name and HelloWorld and Sum is your service methods
service.HelloWorld("ali", function (x) {
console.log(x);
});
});
//HealthFamilyClientService is your client service servicename
var callback = provider.RegisterCallbackService("HealthFamilyClientService");
//ReceivedMessage is your method name and name , family is your method parameters
callback.ReceivedMessage = function (name,family) {
console.log("ReceivedMessage is called: name=" + name + " family="+family);
//result of your client method to server
return "welcome to client method!";
};
}
https://github.com/SignalGo/client-js/blob/master/index.html
Install-Package SignalGo.JavaScript.Client
I welcome all pull requests from you guys.Here are 3 basic rules of your request:
- Match coding style (braces, spacing, etc.)
- If its a feature, bugfix, or anything please only change code to what you specify.
- Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)