added kill messages

This commit is contained in:
2022-07-20 22:00:33 -04:00
parent 7a3f194cd5
commit 83d7e5d465
+4 -4
View File
@@ -88,14 +88,14 @@ func main() {
// convert read bytes into string and print
fmt.Println( "<<", string( buf[:n] ) )
if *verbose {
fmt.Println( "\nrtt: ", t.Sub( start ) ) // print time
}
// response is "kill" if user sends a kill message
if string( buf[:n] ) == "kill" {
os.Exit( 1 )
}
if *verbose {
fmt.Println( "\nrtt: ", t.Sub( start ) ) // print time
}
}
os.Exit( 0 ) // exeunt