Skip to content

Commit

Permalink
Fix: missing abstract defs in Crystal::EventLoop::Socket interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Jan 30, 2025
1 parent e25f992 commit eb020b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/crystal/event_loop/socket.cr
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ abstract class Crystal::EventLoop
# Use `#receive_from` for capturing the source address of a message.
abstract def read(socket : ::Socket, slice : Bytes) : Int32

# Blocks the current fiber until the socket is ready for read.
abstract def wait_readable(socket : ::Socket) : Nil

# Writes at least one byte from *slice* to the socket.
#
# Blocks the current fiber if the socket is not ready for writing,
Expand All @@ -25,6 +28,9 @@ abstract class Crystal::EventLoop
# Use `#send_to` for sending a message to a specific target address.
abstract def write(socket : ::Socket, slice : Bytes) : Int32

# Blocks the current fiber until the socket is ready for write.
abstract def wait_writable(socket : ::Socket) : Nil

# Accepts an incoming TCP connection on the socket.
#
# Blocks the current fiber if no connection is waiting, continuing when one
Expand Down

0 comments on commit eb020b8

Please sign in to comment.