|
|
@ -33,12 +33,13 @@ func receiveClient() error { |
|
|
// fmt.Printf("Server address: %s\n", address)
|
|
|
// fmt.Printf("Server address: %s\n", address)
|
|
|
// 注释上面的局域网广播
|
|
|
// 注释上面的局域网广播
|
|
|
fmt.Println("xtfs run as receive role...") |
|
|
fmt.Println("xtfs run as receive role...") |
|
|
|
|
|
// 显示状态等
|
|
|
|
|
|
http.HandleFunc("/", handler.ReceiveStatus) |
|
|
|
|
|
// http.HandleFunc("/upload", handler.ReceiveHandler)
|
|
|
|
|
|
// http.Handle("/static/", http.StripPrefix("/static/",
|
|
|
|
|
|
// http.FileServer(http.FS(web.StaticFs))))
|
|
|
|
|
|
|
|
|
http.HandleFunc("/", handler.ReceiveHandler) |
|
|
fmt.Println("Waiting for receive...") |
|
|
http.Handle("/static/", http.StripPrefix("/static/", |
|
|
|
|
|
http.FileServer(http.FS(web.StaticFs)))) |
|
|
|
|
|
|
|
|
|
|
|
fmt.Println("Waiting for transfer...") |
|
|
|
|
|
return http.ListenAndServe(config.G.WildcardAddress, nil) |
|
|
return http.ListenAndServe(config.G.WildcardAddress, nil) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|