mirror of
				https://github.com/traefik/traefik.git
				synced 2025-10-31 00:11:38 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			338 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			338 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package tcp
 | |
| 
 | |
| import (
 | |
| 	"net"
 | |
| )
 | |
| 
 | |
| // Handler is the TCP Handlers interface
 | |
| type Handler interface {
 | |
| 	ServeTCP(conn net.Conn)
 | |
| }
 | |
| 
 | |
| // The HandlerFunc type is an adapter to allow the use of
 | |
| // ordinary functions as handlers.
 | |
| type HandlerFunc func(conn net.Conn)
 | |
| 
 | |
| // ServeTCP serves tcp
 | |
| func (f HandlerFunc) ServeTCP(conn net.Conn) {
 | |
| 	f(conn)
 | |
| }
 |