}
}else{
fmt.Printf( "Contains ip " )
if ipNet.Contains( rAddr ) {
authorized =true
}
}
}
if authorized == true{
curTime:=time.Now()
fmt.Printf( curTime.Format( "2006-01-02 15:04:05" ) )
conn.Write( []byte(curTime.Format( "2006-01-02 15:04:05" ) ) )
time.Sleep( 10)
}else{
conn.Close()
}
}
}
希望本文所述对大家的Go语言程序设计有所帮助。









