Skip to content

Commit

Permalink
Make Sample Work by Default (microsoft#1140)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Jan 5, 2021
1 parent bb5b76a commit c0e67f4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/tools/sample/sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ RunClient(
QUIC_STATUS Status;
const char* ResumptionTicketString = nullptr;
HQUIC Connection = nullptr;
const uint32_t Version = 0xff00001dU; // IETF draft 29

//
// Allocate a new connection object.
Expand All @@ -745,12 +746,22 @@ RunClient(
}
}

//
// Default to using the draft-29 version for now, since it's more
// universally supported by the TLS abstractions currently.
//
if (QUIC_FAILED(Status = MsQuic->SetParam(Connection, QUIC_PARAM_LEVEL_CONNECTION, QUIC_PARAM_CONN_QUIC_VERSION, sizeof(Version), &Version))) {
printf("SetParam(QUIC_PARAM_CONN_QUIC_VERSION) failed, 0x%x!\n", Status);
goto Error;
}

//
// Get the target / server name or IP from the command line.
//
const char* Target;
if ((Target = GetValue(argc, argv, "target")) == nullptr) {
printf("Must specify '-target' argument!\n");
Status = QUIC_STATUS_INVALID_PARAMETER;
goto Error;
}

Expand Down

0 comments on commit c0e67f4

Please sign in to comment.