Skip to content

Commit

Permalink
Fix EventLoop docs for Socket read, write (#15194)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Nov 16, 2024
1 parent 69d192a commit ea86dd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crystal/system/event_loop/socket.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit ea86dd5

Please sign in to comment.