@@ -123,8 +123,8 @@ async fn create_tunnel(ctx: Arc<ClientContext>, association: &str) -> std::io::R
123123 Ok ( ( ) )
124124}
125125
126- /// Represents a tunnel and its pool of conenctions that it can
127- /// send data to and receieve data from
126+ /// Represents a tunnel and its pool of connections that it can
127+ /// send data to and receive data from
128128struct Tunnel {
129129 /// Tunnel connection to the Pocket Relay server for sending [`TunnelMessage`]s
130130 /// through the server to reach a specific peer
@@ -149,15 +149,15 @@ enum TunnelWriteState {
149149 Write ( Option < TunnelMessage > ) ,
150150 /// Poll flushing the bytes written to [`Tunnel::io`]
151151 Flush ,
152- /// The tunnnel has stopped and should not continue
152+ /// The tunnel has stopped and should not continue
153153 Stop ,
154154}
155155
156156/// Holds the state for the current reading progress for a [`Tunnel`]
157157enum TunnelReadState {
158158 /// Continue reading
159159 Continue ,
160- /// The tunnnel has stopped and should not continue
160+ /// The tunnel has stopped and should not continue
161161 Stop ,
162162}
163163
@@ -274,16 +274,16 @@ struct SocketHandle(mpsc::UnboundedSender<TunnelMessage>);
274274/// Size of the socket read buffer 2^16 bytes
275275///
276276/// Can likely be reduced to 2^15 bytes or 2^13 bytes (or lower) since
277- /// highest observed message length was 1254 bytes but testing is requried
277+ /// highest observed message length was 1254 bytes but testing is required
278278/// before that can take place
279279const READ_BUFFER_LENGTH : usize = 2usize . pow ( 16 ) ;
280280
281- /// Socket used by a [`Tunnel`] for sending and recieving messages in
281+ /// Socket used by a [`Tunnel`] for sending and receiving messages in
282282/// order to simulate another player on the local network
283283struct Socket {
284284 // Index of the socket
285285 index : u8 ,
286- // The underlying socket for sending and recieving
286+ // The underlying socket for sending and receiving
287287 socket : UdpSocket ,
288288 /// Receiver for messages coming from the the [`Tunnel`] that need to be
289289 /// send through the socket
@@ -305,15 +305,15 @@ enum SocketWriteState {
305305 Recv ,
306306 /// Waiting for the [`Socket::socket`] to write the bytes
307307 Write ( Bytes ) ,
308- /// The tunnnel has stopped and should not continue
308+ /// The tunnel has stopped and should not continue
309309 Stop ,
310310}
311311
312312/// Holds the state for the current reading progress for a [`Socket`]
313313enum SocketReadState {
314314 /// Continue reading
315315 Continue ,
316- /// The tunnnel has stopped and should not continue
316+ /// The tunnel has stopped and should not continue
317317 Stop ,
318318}
319319
@@ -392,7 +392,7 @@ impl Socket {
392392 return Poll :: Ready ( SocketWriteState :: Stop ) ;
393393 } ;
394394
395- // Didnt write entire messsage
395+ // Didn't write the entire message
396396 if count != message. len ( ) {
397397 // Continue with a writing state at the remaining message
398398 let message = message. slice ( count..) ;
@@ -420,7 +420,7 @@ impl Socket {
420420 return Poll :: Ready ( SocketReadState :: Stop ) ;
421421 }
422422
423- // Get the recieved message
423+ // Get the received message
424424 let bytes = read_buf. filled ( ) ;
425425 let message = Bytes :: copy_from_slice ( bytes) ;
426426 let message = TunnelMessage {
0 commit comments