aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/connect.rs
diff options
context:
space:
mode:
authorUbuntu <github@matdoes.dev>2022-11-11 21:04:18 +0000
committerUbuntu <github@matdoes.dev>2022-11-11 21:04:18 +0000
commit4a1ec068fc13393e249853403085be6958a807a4 (patch)
treebdaf6de36f1682eef0839122af1ba9037fa95165 /azalea-protocol/src/connect.rs
parentdc62ada865db6534e7c4a5a958d82c44e42bf089 (diff)
downloadazalea-drasl-4a1ec068fc13393e249853403085be6958a807a4.tar.xz
improved docs
Diffstat (limited to 'azalea-protocol/src/connect.rs')
-rw-r--r--azalea-protocol/src/connect.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs
index f67d0e4a..d14d3424 100644
--- a/azalea-protocol/src/connect.rs
+++ b/azalea-protocol/src/connect.rs
@@ -1,4 +1,4 @@
-//! Create connections that communicate with a remote server or client.
+//! Connect to remote servers/clients.
use crate::packets::game::{ClientboundGamePacket, ServerboundGamePacket};
use crate::packets::handshake::{ClientboundHandshakePacket, ServerboundHandshakePacket};
@@ -11,7 +11,7 @@ use crate::write::write_packet;
use azalea_auth::sessionserver::SessionServerError;
use azalea_crypto::{Aes128CfbDec, Aes128CfbEnc};
use bytes::BytesMut;
-use log::{info, error};
+use log::{error, info};
use std::fmt::Debug;
use std::marker::PhantomData;
use std::net::SocketAddr;
@@ -116,6 +116,7 @@ impl<R> ReadConnection<R>
where
R: ProtocolPacket + Debug,
{
+ /// Read a packet from the stream.
pub async fn read(&mut self) -> Result<R, ReadPacketError> {
read_packet::<R, _>(
&mut self.read_stream,