ing
This commit is contained in:
		
							parent
							
								
									28723e5290
								
							
						
					
					
						commit
						dd65016b7d
					
				| @ -176,7 +176,7 @@ func handleConnection(s *server, soc Socket, socketHandler SocketHandler) { | ||||
| 	defer s.stopWg.Done() | ||||
| 
 | ||||
| 	clientStopChan := make(chan struct{}) | ||||
| 	handleDoneChan := make(chan struct{}) | ||||
| 	handleDoneChan := make(chan error, 1) | ||||
| 
 | ||||
| 	go socketHandler.Handle(soc, clientStopChan, handleDoneChan) | ||||
| 
 | ||||
|  | ||||
| @ -32,7 +32,7 @@ type SocketHandler interface { | ||||
| 	// 	return newSoc | ||||
| 	// } | ||||
| 	OnConnect(soc Socket) | ||||
| 	Handle(soc Socket, stopChan <-chan struct{}, doneChan chan<- struct{}) | ||||
| 	Handle(soc Socket, stopChan <-chan struct{}, doneChan chan<- error) | ||||
| 	// OnDisconnect invoked when client is disconnected | ||||
| 	// If you override ths method, must call | ||||
| 	// | ||||
|  | ||||
| @ -48,7 +48,7 @@ func (sh *SocketHandlers) OnConnect(soc Socket) Socket { | ||||
| 	return soc | ||||
| } | ||||
| 
 | ||||
| func (sh *SocketHandlers) Handle(soc Socket, stopChan <-chan struct{}, doneChan chan<- struct{}) { | ||||
| func (sh *SocketHandlers) Handle(soc Socket, stopChan <-chan struct{}, doneChan chan<- error) { | ||||
| 	// no op | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user