Skip to content

Commit

Permalink
Fix: syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Jan 27, 2025
1 parent 0578808 commit ea32e8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crystal/event_loop/file_descriptor.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ abstract class Crystal::EventLoop
abstract def read(file_descriptor : Crystal::System::FileDescriptor, slice : Bytes) : Int32

# Blocks the current fiber until the file descriptor is ready for read.
abstract def wait_readable(file_descriptor Crystal::System::FileDescriptor) : Nil
abstract def wait_readable(file_descriptor : Crystal::System::FileDescriptor) : Nil

# Writes at least one byte from *slice* to the file descriptor.
#
Expand All @@ -21,7 +21,7 @@ abstract class Crystal::EventLoop
abstract def write(file_descriptor : Crystal::System::FileDescriptor, slice : Bytes) : Int32

# Blocks the current fiber until the file descriptor is ready for write.
abstract def wait_writable(file_descriptor Crystal::System::FileDescriptor) : Nil
abstract def wait_writable(file_descriptor : Crystal::System::FileDescriptor) : Nil

# Closes the file descriptor resource.
abstract def close(file_descriptor : Crystal::System::FileDescriptor) : Nil
Expand Down
1 change: 1 addition & 0 deletions src/crystal/event_loop/libevent.cr
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class Crystal::EventLoop::LibEvent < Crystal::EventLoop
socket.evented_wait_writable do
raise IO::TimeoutError.new("Write timed out")
end
end

def receive_from(socket : ::Socket, slice : Bytes) : Tuple(Int32, ::Socket::Address)
sockaddr = Pointer(LibC::SockaddrStorage).malloc.as(LibC::Sockaddr*)
Expand Down

0 comments on commit ea32e8b

Please sign in to comment.