| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \ \
| |/ /
|/| /
| |/
| |
| |
| | |
rpc: Rename SingletonId to SingleIdResponse
Closes #1585
See merge request tpo/core/arti!2448
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Calling it "singleton" might have suggested that it was using the
[singleton pattern](https://en.wikipedia.org/wiki/Singleton_pattern),
which it isn't.
(Renaming done with rust-analyzer and double-checked with `git grep`.)
Closes #1585.
|
| |/
|
|
|
|
|
|
|
|
|
| |
Now that prop351 is what Arti speaks, it's what the rpclib
needs to provide.
Note one change in particular: the `isolation` string
is no longer an optional argument when opening a stream.
(With prop351, there is no longer such a thing as an "absent"
isolation string, and we don't want to imply that there is a
difference between None and "".)
|
| |
|
|
|
| |
AFIACT, all of this renaming is done. I've grepped for `[Cc]onn`
and didn't find any more identifiers that needed to be renamed.
|
| | |
|
| |
|
|
|
|
| |
(This is about DataStreams, so we should make it less confusing.
This commit is _just_ about the file renaming, with no associated
function renaming.)
|
| | |
|
| |
|
|
|
| |
Ticket #1509 will probably get rid of this constant,
but for now we may as well put it in one place.
|
| |
|
|
|
| |
Here we make sure that we can actually skip over other proxy formats
in the future.
|
| |
|
|
|
|
|
| |
Renamed address to tcp_address, and made it optional, so that later
we can have a unix_path, etc.
On deser side, add support for unrecognized listener types.
|
| | |
|
| |
|
|
|
|
| |
This is done so that we can make "not authenticated" a non-internal
error, under the theory that someday unauthenticated connections
might be exposed.
|
| |
|
|
|
| |
There's a blocking TODO here about exposing socks error codes that
I still need to solve.
|
| |
|
|
|
|
| |
Requires #1523.
Implements #1524.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Its underlying function previously took `&mut RpcHandle`,
which was an accident waiting to happen. Now it takes `&RpcHandle`
and includes a Mutex to prevent multiple threads from waiting for
updates on the same request ID at once.
As an alternative, we *could* try to update connimpl::Receiver to
allow multiple simultaneous listeners on the same request ID.
But that would (I think) require a lot more bookkeeping, and thus
would be a bit more error-prone.
Closes #1532.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test is supposed to check the case where we launch a bunch
of requests but the socket is dropped before we get a response.
Different operating systems handle 'drop' a bit differently,
and schedule threads differently, so we shouldn't be surprised
at slightly different errors here.
In particular, OSX is more prone to deliver the close as a proper
"close" rather than an EPIPE or such, which previously broke
this test.
Closes #1510.
|
| |
|
|
|
|
| |
(This function manipulates an ArtiRpcStatus;
and we try to have all of the ffi functions in this library
begin with "arti_rpc_".)
|
| |
|
|
|
| |
This API allows the caller to launch a request and then watch for
updates on it.
|
| |
|
|
|
|
|
|
| |
Previously, we had in_ptr_opt for functions that want to take
a nullable `*const T` without consuming it.
This is the equivalent for taking a nullable `*mut T` without
consuming it.
|
| |
|
|
|
|
|
|
| |
Previously, we had out_ptr_opt for functions that wanted to return a
newly allocated `ArtiRpcFoo` via a `struct ArtiRpcFoo **` argument.
But we didn't have a way to return non-allocated `int` via an `int
*` argument. This code provides that.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This name change should emphasize that the (module-private)
`ParsedRequestFields` type is only for parsing, and we aren't
supposed to actually construct them for our own requests.
With this change, and the others on the branch, there's no longer a
risk of trying to serialize a ParsedRequestFields (since it doesn't
implement Serialize), or to deserialize a Request (since it doesn't
implement Deserialize).
Closes #1511.
|
| |
|
|
|
|
|
|
| |
As with responses, we previously used a strategy that could have
failed in the future, if we forgot to add an "unexpected_fields"
member to one of our structs.
Closes #1512.
|
| | |
|
| |
|
|
|
|
| |
This lets us make a couple of types module-private,
and prepares the way for using the serde_json::Value trick on
requests too.
|
| | |
|
| |
|
|
|
|
|
|
| |
This approach keeps the property that we still preserve any
unrecognized fields, but takes a different approach. Instead of
using our own `structs` to round-trip the json, we use a
`serde_json::Value`, to ensure that we cannot forget to add the
`unexpected_fields` element to a struct.
|
| |
|
|
| |
(Without this, it isn't actually possible to use the RPC subsystem.)
|
| |
|
|
| |
This will enable us to return it to FFI callers as a nul-terminated string.
|
| |\
| |
| |
| |
| |
| |
| | |
rpc-client-core: Always re-encode requests and responses, and preserve unrecognized struct fields.
Closes #1491
See merge request tpo/core/arti!2312
|
| | |
| |
| |
| | |
This enable a `meta` object to have no `updates` field set.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We want to re-encode responses to avoid possible mismatch between
how arti-rpc-client-core parses messages and how the user application
parses messages. (In theory this shouldn't be necessary so long as
arti-rpc-client-core and arti have the same json implementation,
and arti-rpc-client-core is only used for talking to arti.
But those assumptions might change in the future.)
Closes #1491.
We want to preserve fields so that, if Arti adds any new elements
to response or error in the future, and the client knows about them,
they won't be lost simply because arti-rpc-client-core hasn't heard
of them.
|
| | |
| |
| |
| |
| |
| | |
When writing a request, we want to keep any fields that we don't
recognize, in case the application (and arti) know about some
field that we haven't heard of.
|
| | |
| |
| |
| | |
(They are about to diverge even further.)
|
| |\ \
| | |
| | |
| | |
| | | |
Fix a pair of typos in an ffi comment.
See merge request tpo/core/arti!2310
|
| | |/ |
|
| | |
| |
| |
| | |
Closes #1501.
|
| | |
| |
| |
| | |
(This is an errno or a GetLastError.)
|
| |/
|
|
|
| |
This will make error outputs more usable, and will make it possible
to expose OS error codes.
|
| |
|
|
|
| |
Rust 1.70 (our MSRV) will not allow us to use a trait from a private
module in this way, unfortunately.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Additionally, inline the related conversion functions.
This should reduce the total amount of unsafe code that somebody
would need to look at.
|
| | |
|