-
Notifications
You must be signed in to change notification settings - Fork 8
Add SDP service #10
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
base: main
Are you sure you want to change the base?
Add SDP service #10
Conversation
|
Same as #11, if there are multiple apps requiring SDP dicovery, should there be a singleton pattern for SDP?(Though this is probably a Bumble implementation detail) |
557765f to
9b7fb91
Compare
| rpc RemoveService(RemoveServiceRequest) returns (google.protobuf.Empty); | ||
| // List all registered SDP services | ||
| rpc ListAttributes(ListAttributesRequest) returns (ListAttributesResponse); | ||
| // Client methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to remove the Connect and Disconnect APIs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would them be a problem: if there are multiple SDP connections on the same ACL connection, which one it should go?
| // Register an SDP service | ||
| rpc AddService(AddServiceRequest) returns (google.protobuf.Empty); | ||
| // Remove an SDP service | ||
| rpc RemoveService(RemoveServiceRequest) returns (google.protobuf.Empty); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the RemoveService API and I'm not even sure we need to AddService as well 🤔
| message ListAttributesRequest {} | ||
|
|
||
| message ListAttributesResponse { | ||
| repeated ServiceAttribute attributes = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| repeated ServiceAttribute attributes = 1; | |
| map<uint32, repeated ServiceAttribute> attributes = 1; |
| } | ||
|
|
||
| message ServiceAttribute { | ||
| uint32 id = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use an enum instead
| // Remove an SDP service | ||
| rpc RemoveService(RemoveServiceRequest) returns (google.protobuf.Empty); | ||
| // List all registered SDP services | ||
| rpc ListAttributes(ListAttributesRequest) returns (ListAttributesResponse); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any use case for this one ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An usage is to avoid handle collision
Feel free to modify