Add support for Tokio (async) (#10)

Fixes #6
This commit is contained in:
Aram Peres 2021-07-31 12:52:53 -04:00 committed by GitHub
parent 36202d9f1f
commit 5c9923d000
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 547 additions and 3 deletions

View file

@ -135,7 +135,7 @@ impl TcpConnection {
}
#[cfg(not(feature = "ssl"))]
fn enable_ssl(mut self) -> crate::Result<Self> {
fn enable_ssl(self) -> crate::Result<Self> {
Ok(self)
}
@ -185,6 +185,7 @@ impl TcpConnection {
self.read_response()?.expect_var()
}
#[allow(dead_code)]
fn get_network_version(&mut self) -> crate::Result<String> {
self.write_cmd(Command::NetworkVersion)?;
self.read_plain_response()