added kill messages
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user