Using compression by default

This commit is contained in:
godmodegalactus 2024-04-22 18:24:27 +02:00
parent fb1c9f0ea6
commit 58b05ce157
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
1 changed files with 0 additions and 23 deletions

View File

@ -10,29 +10,6 @@ use yellowstone_grpc_proto::tonic::metadata::AsciiMetadataValue;
use yellowstone_grpc_proto::tonic::service::Interceptor; use yellowstone_grpc_proto::tonic::service::Interceptor;
use yellowstone_grpc_proto::tonic::transport::ClientTlsConfig; use yellowstone_grpc_proto::tonic::transport::ClientTlsConfig;
pub async fn connect_with_timeout<E, T>(
endpoint: E,
x_token: Option<T>,
tls_config: Option<ClientTlsConfig>,
connect_timeout: Option<Duration>,
request_timeout: Option<Duration>,
connect_lazy: bool,
) -> GeyserGrpcClientResult<GeyserGrpcClient<impl Interceptor>>
where
E: Into<Bytes>,
T: TryInto<AsciiMetadataValue, Error = InvalidMetadataValue>,
{
GeyserGrpcClient::connect_with_timeout(
endpoint,
x_token,
tls_config,
connect_timeout,
request_timeout,
connect_lazy,
)
.await
}
// see https://github.com/hyperium/tonic/blob/v0.10.2/tonic/src/transport/channel/mod.rs // see https://github.com/hyperium/tonic/blob/v0.10.2/tonic/src/transport/channel/mod.rs
const DEFAULT_BUFFER_SIZE: usize = 1024; const DEFAULT_BUFFER_SIZE: usize = 1024;
// see https://github.com/hyperium/hyper/blob/v0.14.28/src/proto/h2/client.rs#L45 // see https://github.com/hyperium/hyper/blob/v0.14.28/src/proto/h2/client.rs#L45