Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upExpose send on the SyncClient #624
Comments
mattias-p
changed the title
Private data member in client::ClientHandle
Cannot construct client::ClientHandle
Nov 21, 2018
mattias-p
changed the title
Cannot construct client::ClientHandle
Cannot construct client::ClientResponse
Nov 21, 2018
bluejekyll
added
enhance
crate:client
easy
labels
Nov 22, 2018
This comment has been minimized.
This comment has been minimized.
|
I don't think this is actually what you want. Based on your description, you want to have more control over how the Would you want to make this change to implement Another more extensive change we could make would be to create a new pre send hook, where a message could be inspected before send, and allow you to override different portions of the |
This comment has been minimized.
This comment has been minimized.
|
Thank you so much for your excellent response! Your explanation validates my general approach and it helped me realize where I went wrong. I've ended up with this rather nice method I'm quite happy with that solution. For me getting my hands on the async stuff is pure gravy as I was planning to go that route anyway. |


mattias-p commentedNov 21, 2018
I need to send queries with the RD flag disables. I started out with the SyncClient hello world example and just inlined my way towards the Message. However I can't inline client::ClientHandle::query because client::ClientResponse's data member is private and there's no constructor.
A public constructor for ClientResponse would solve my problem. Making the data member public would also work, but from my limited understanding it makes more sense to keep ClientResponse opaque.