Files
linuxkit/alpine/packages/diagnostics/rawtcp.go
Riyaz Faizullabhoy f2a1c0dd24 Add golint, make linting top-level
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-19 16:13:02 -08:00

22 lines
409 B
Go

package main
import (
"log"
"net"
)
// RawTCPDiagnosticListener is a diagnostic server listening on a TCP port
type RawTCPDiagnosticListener struct{}
// Listen for RawTCPDiagnosticListener listens on port 62374
func (l RawTCPDiagnosticListener) Listen() {
ip, err := net.Listen("tcp", ":62374")
if err != nil {
log.Printf("Failed to bind to TCP port 62374: %s", err)
}
for {
TarRespond(ip)
}
}