From ea86dd5b7c939e9b11c6fb9fd61c48cf3496cd40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Sat, 16 Nov 2024 12:18:28 +0100 Subject: [PATCH] Fix `EventLoop` docs for `Socket` `read`, `write` (#15194) --- src/crystal/system/event_loop/socket.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crystal/system/event_loop/socket.cr b/src/crystal/system/event_loop/socket.cr index 6309aed391e0..8fa86e50affc 100644 --- a/src/crystal/system/event_loop/socket.cr +++ b/src/crystal/system/event_loop/socket.cr @@ -12,7 +12,7 @@ abstract class Crystal::EventLoop # Returns the number of bytes read (up to `slice.size`). # Returns 0 when the socket is closed and no data available. # - # Use `#send_to` for sending a message to a specific target address. + # Use `#receive_from` for capturing the source address of a message. abstract def read(socket : ::Socket, slice : Bytes) : Int32 # Writes at least one byte from *slice* to the socket. @@ -22,7 +22,7 @@ abstract class Crystal::EventLoop # # Returns the number of bytes written (up to `slice.size`). # - # Use `#receive_from` for capturing the source address of a message. + # Use `#send_to` for sending a message to a specific target address. abstract def write(socket : ::Socket, slice : Bytes) : Int32 # Accepts an incoming TCP connection on the socket.