Skip to content

Commit

Permalink
Fix write/read docs
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Nov 14, 2024
1 parent 5e0bbaa commit e5965f6
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 e5965f6

Please sign in to comment.