Skip to content

SignalR Client for miniprogram, SignalR小程序客户端

License

Notifications You must be signed in to change notification settings

8ggmaker/MiniProgram-SignalR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weapp-SignalR

SignalR Client for weapp and browser, only supports WebSocket now.

How to use

1. build with gulp

npm install
gulp

2. quick start

var signalR = require('yourpath/signalr-client')
var hubConnection = new signalR.HubConnection(url);
var hubProxy = hubConnection.createHubProxy(hubName);
hubProxy.on(eventName,function(...args){

})
hubConnection.started(()=>{
    hubProxy.invoke(methodname,...args).then(()=>{

    })
})
hubConnection.start()

3. connection lifetime event

started
received
connectionSlow
reconnecting
reconnected
disconnected

About

SignalR Client for miniprogram, SignalR小程序客户端

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published