Using a port of 0 and letting the OS choose for us means that we can run multiple peers locally
This commit is contained in:
parent
c29344ba6d
commit
9ab8db41de
2 changed files with 3 additions and 3 deletions
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
|
@ -11,7 +11,7 @@
|
|||
"cargo": {
|
||||
"args": ["build"]
|
||||
},
|
||||
"args": ["--seed=gargamel"],
|
||||
"args": ["--seed=gargamel", "--port=25565"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"CARGO_MANIFEST_DIR": "${workspaceFolder}",
|
||||
|
@ -30,7 +30,7 @@
|
|||
"cargo": {
|
||||
"args": ["build"]
|
||||
},
|
||||
"args": ["--port=25566", "--connect=[::1]:25565"],
|
||||
"args": ["--connect=[::1]:25565"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"CARGO_MANIFEST_DIR": "${workspaceFolder}",
|
||||
|
|
|
@ -20,7 +20,7 @@ pub struct AppSettings {
|
|||
source: Source,
|
||||
|
||||
/// The port the app should listen for connections on
|
||||
#[arg(short, long, default_value = "25565")]
|
||||
#[arg(short, long, default_value = "0")]
|
||||
port: u16,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue