File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -211,26 +211,26 @@ func (l PLogger) Info(args ...interface{}) {
211
211
send (l .hub , map [string ]string {uploadStatusStr : "Busy" , "Msg" : output })
212
212
}
213
213
214
- func send (hub * hub , args map [string ]string ) {
214
+ func send (h * hub , args map [string ]string ) {
215
215
mapB , _ := json .Marshal (args )
216
- hub .broadcastSys <- mapB
216
+ h .broadcastSys <- mapB
217
217
}
218
218
219
- func wsHandler (hub * hub ) * WsServer {
219
+ func wsHandler (h * hub ) * WsServer {
220
220
server , err := socketio .NewServer (nil )
221
221
if err != nil {
222
222
log .Fatal (err )
223
223
}
224
224
225
225
server .On ("connection" , func (so socketio.Socket ) {
226
226
c := & connection {send : make (chan []byte , 256 * 10 ), ws : so }
227
- hub .register <- c
227
+ h .register <- c
228
228
so .On ("command" , func (message string ) {
229
- hub .broadcast <- []byte (message )
229
+ h .broadcast <- []byte (message )
230
230
})
231
231
232
232
so .On ("disconnection" , func () {
233
- hub .unregister <- c
233
+ h .unregister <- c
234
234
})
235
235
go c .writer ()
236
236
})
You can’t perform that action at this time.
0 commit comments