@@ -54,7 +54,7 @@ type ClientDispatcher interface {
5454 // Sets the network client, so the dispatcher may send requests using the networking layer directly.
5555 //
5656 // This needs to be set before calling the Start method. If not, sending requests will fail.
57- SetNetworkClient (client ws.WsClient )
57+ SetNetworkClient (client ws.Client )
5858 // Sets the state manager for pending requests in the dispatcher.
5959 //
6060 // The state should only be accessed by the dispatcher while running.
@@ -90,7 +90,7 @@ type DefaultClientDispatcher struct {
9090 requestChannel chan bool
9191 readyForDispatch chan bool
9292 pendingRequestState ClientState
93- network ws.WsClient
93+ network ws.Client
9494 mutex sync.RWMutex
9595 onRequestCancel func (requestID string , request ocpp.Request , err * ocpp.Error )
9696 timer * time.Timer
@@ -149,7 +149,7 @@ func (d *DefaultClientDispatcher) Stop() {
149149 // TODO: clear pending requests?
150150}
151151
152- func (d * DefaultClientDispatcher ) SetNetworkClient (client ws.WsClient ) {
152+ func (d * DefaultClientDispatcher ) SetNetworkClient (client ws.Client ) {
153153 d .network = client
154154}
155155
@@ -335,7 +335,7 @@ type ServerDispatcher interface {
335335 // Sets the network server, so the dispatcher may send requests using the networking layer directly.
336336 //
337337 // This needs to be set before calling the Start method. If not, sending requests will fail.
338- SetNetworkServer (server ws.WsServer )
338+ SetNetworkServer (server ws.Server )
339339 // Sets the state manager for pending requests in the dispatcher.
340340 //
341341 // The state should only be accessed by the dispatcher while running.
@@ -371,7 +371,7 @@ type DefaultServerDispatcher struct {
371371 running bool
372372 stoppedC chan struct {}
373373 onRequestCancel CanceledRequestHandler
374- network ws.WsServer
374+ network ws.Server
375375 mutex sync.RWMutex
376376}
377377
@@ -442,7 +442,7 @@ func (d *DefaultServerDispatcher) DeleteClient(clientID string) {
442442 }
443443}
444444
445- func (d * DefaultServerDispatcher ) SetNetworkServer (server ws.WsServer ) {
445+ func (d * DefaultServerDispatcher ) SetNetworkServer (server ws.Server ) {
446446 d .network = server
447447}
448448
@@ -491,7 +491,7 @@ func (d *DefaultServerDispatcher) messagePump() {
491491 for {
492492 select {
493493 case <- d .stoppedC :
494- // Server was stopped
494+ // server was stopped
495495 d .queueMap .Init ()
496496 log .Info ("stopped processing requests" )
497497 return
@@ -547,7 +547,7 @@ func (d *DefaultServerDispatcher) messagePump() {
547547 clientCtx .cancel ()
548548 clientContextMap [clientID ] = clientTimeoutContext {}
549549 }
550- // Client can now transmit again
550+ // client can now transmit again
551551 clientQueue , ok = d .queueMap .Get (clientID )
552552 if ok {
553553 // Ready to transmit
@@ -620,7 +620,7 @@ func (d *DefaultServerDispatcher) waitForTimeout(clientID string, clientCtx clie
620620 log .Debugf ("timeout canceled for %s" , clientID )
621621 }
622622 case <- d .stoppedC :
623- // Server was stopped, every pending timeout gets canceled
623+ // server was stopped, every pending timeout gets canceled
624624 }
625625}
626626
0 commit comments