method
flush_write_buffer
Ruby on Rails latest stable (v7.1.3.2)
-
0 notes -
Class: Stream
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
flush_write_buffer()
public
Hide source
# File actioncable/lib/action_cable/connection/stream.rb, line 70 def flush_write_buffer @write_lock.synchronize do loop do if @write_head.nil? return true if @write_buffer.empty? @write_head = @write_buffer.pop end written = @rack_hijack_io.write_nonblock(@write_head, exception: false) case written when :wait_writable return false when @write_head.bytesize @write_head = nil else @write_head = @write_head.byteslice(written, @write_head.bytesize) return false end end end end