|
|
|
@ -9,27 +9,9 @@ use tokio::net; |
|
|
|
|
|
|
|
use crate::proto::core::frame::FrameStream;
|
|
|
|
use crate::proto::server::{
|
|
|
|
Credentials, LoginResponse, ServerRequest, ServerResponse,
|
|
|
|
Credentials, LoginResponse, ServerRequest, ServerResponse, Version,
|
|
|
|
};
|
|
|
|
|
|
|
|
/// Specifies a protocol version.
|
|
|
|
pub struct Version {
|
|
|
|
/// The major version number.
|
|
|
|
pub major: u32,
|
|
|
|
|
|
|
|
/// The minor version number.
|
|
|
|
pub minor: u32,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Default for Version {
|
|
|
|
fn default() -> Self {
|
|
|
|
Self {
|
|
|
|
major: 181,
|
|
|
|
minor: 100,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Specifies options for a new `Client`.
|
|
|
|
pub struct ClientOptions {
|
|
|
|
pub credentials: Credentials,
|
|
|
|
|