Browse Source

[main] verbose output flag changed to ?; [node] added 3 microsecond delay in sender node when sending file info packets

main
Unbewohnte 3 years ago
parent
commit
74464c9470
  1. 2
      README.md
  2. 4
      src/main.go
  3. 2
      src/node/node.go

2
README.md

@ -54,7 +54,7 @@ Now you have ftu installed !
- -a [ip_address|domain_name] address to connect to (cannot be used with -s)
- -d [path_to_directory] where the files will be downloaded to (cannot be used with -s)
- -s [path_to_file|directory] to send it (cannot be used with -a)
- -vp [true|false] to turn on|off verbose output
- -? [true|false] to turn on|off verbose output
- -v print version text
- -l print license

4
src/main.go

@ -43,7 +43,7 @@ var (
ADDRESS *string = flag.String("a", "", "Specifies an address to connect to")
DOWNLOADS_DIR *string = flag.String("d", ".", "Downloads folder")
SEND *string = flag.String("s", "", "Specify a file|directory to send")
VERBOSE *bool = flag.Bool("vp", false, "Turn on/off verbose output")
VERBOSE *bool = flag.Bool("?", false, "Turn on/off verbose output")
PRINT_VERSION *bool = flag.Bool("v", false, "Print version information")
PRINT_LICENSE *bool = flag.Bool("l", false, "Print license information")
@ -60,7 +60,7 @@ func init() {
fmt.Printf("| -a [ip_address|domain_name] address to connect to (cannot be used with -s)\n")
fmt.Printf("| -d [path_to_directory] where the files will be downloaded to (cannot be used with -s)\n")
fmt.Printf("| -s [path_to_file|directory] to send it (cannot be used with -a)\n")
fmt.Printf("| -vp [true|false] to turn on|off verbose output\n")
fmt.Printf("| -? [true|false] to turn on|off verbose output\n")
fmt.Printf("| -l print license information\n")
fmt.Printf("| -v print version information\n\n\n")

2
src/node/node.go

@ -380,6 +380,8 @@ func (node *Node) Start() {
if node.verboseOutput {
fmt.Printf("\n[File] Sent filepacket for \"%s\"", file.Name)
}
time.Sleep(time.Microsecond * 3)
}
filesInfoDonePacket := protocol.Packet{

Loading…
Cancel
Save