Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuicConnectionAddress#toString doesn't show the actual connection id #338

Closed
violetagg opened this issue Oct 8, 2021 · 1 comment · Fixed by #339
Closed

QuicConnectionAddress#toString doesn't show the actual connection id #338

violetagg opened this issue Oct 8, 2021 · 1 comment · Fixed by #339
Milestone

Comments

@violetagg
Copy link
Member

With the current implementation we have:

@Override
public String toString() {
if (this == EPHEMERAL) {
return "QuicConnectionAddress{EPHEMERAL}";
}
return "QuicConnectionAddress{" +
"connId=" + connId + '}';
}

Which results in showing the connection toString like this:

(a86d995442569cff63623df10129c093a4c2b16d)[id: 0xa72ff977, L:QuicConnectionAddress{connId=java.nio.HeapByteBuffer[pos=0 lim=20 cap=20]} ! R:QuicConnectionAddress{connId=java.nio.HeapByteBuffer[pos=0 lim=20 cap=20]}]

Is that intentional?

For example for traceId we have better string representation (a86d995442569cff63623df10129c093a4c2b16d)

byte[] traceId = Quiche.quiche_conn_trace_id(connection.address());
if (traceId != null) {
this.traceId = new String(traceId);

normanmaurer added a commit that referenced this issue Oct 8, 2021
Motivation:

The toString() method of QuicConnectionAddress did produce a not so useful string representation.

Modifications:

Use a hexdump presentation of the id

Result:

Fixes #338
@normanmaurer
Copy link
Member

See #339

normanmaurer added a commit that referenced this issue Oct 11, 2021
Motivation:

The toString() method of QuicConnectionAddress did produce a not so useful string representation.

Modifications:

Use a hexdump presentation of the id

Result:

Fixes #338
@normanmaurer normanmaurer added this to the 0.0.19.Final milestone Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants