Class: QuartzTorrent::IOInfo
- Inherits:
-
Object
- Object
- QuartzTorrent::IOInfo
- Defined in:
- lib/quartz_torrent/reactor.rb
Overview
An IO and associated meta-information used by the Reactor. This is not part of the public API.
Instance Attribute Summary collapse
-
#connectTimeout ⇒ Object
Returns the value of attribute connectTimeout.
-
#connectTimer ⇒ Object
Returns the value of attribute connectTimer.
-
#io ⇒ Object
Returns the value of attribute io.
-
#lastReadError ⇒ Object
Returns the value of attribute lastReadError.
-
#metainfo ⇒ Object
Returns the value of attribute metainfo.
-
#outputBuffer ⇒ Object
Returns the value of attribute outputBuffer.
-
#readFiber ⇒ Object
Returns the value of attribute readFiber.
-
#readFiberIoFacade ⇒ Object
Returns the value of attribute readFiberIoFacade.
-
#readRateLimit ⇒ Object
Returns the value of attribute readRateLimit.
-
#state ⇒ Object
Returns the value of attribute state.
-
#useErrorhandler ⇒ Object
Returns the value of attribute useErrorhandler.
-
#writeRateLimit ⇒ Object
Returns the value of attribute writeRateLimit.
Instance Method Summary collapse
-
#initialize(io, metainfo, seekable = false) ⇒ IOInfo
constructor
Create a new IOInfo object that operates on the passed IO object.
-
#seekable? ⇒ Boolean
Is the IO seekable.
Constructor Details
#initialize(io, metainfo, seekable = false) ⇒ IOInfo
Create a new IOInfo object that operates on the passed IO object.
336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/quartz_torrent/reactor.rb', line 336 def initialize(io, , seekable = false) @io = io = @readFiber = nil @readFiberIoFacade = IoFacade.new(self) @lastReadError = nil @connectTimer = nil @seekable = seekable @outputBuffer = OutputBuffer.new(@io, seekable) @useErrorhandler = true @readRateLimit = nil @writeRateLimit = nil raise "IO passed to IOInfo initialize may not be nil" if io.nil? end |
Instance Attribute Details
#connectTimeout ⇒ Object
Returns the value of attribute connectTimeout.
354 355 356 |
# File 'lib/quartz_torrent/reactor.rb', line 354 def connectTimeout @connectTimeout end |
#connectTimer ⇒ Object
Returns the value of attribute connectTimer.
358 359 360 |
# File 'lib/quartz_torrent/reactor.rb', line 358 def connectTimer @connectTimer end |
#io ⇒ Object
Returns the value of attribute io.
350 351 352 |
# File 'lib/quartz_torrent/reactor.rb', line 350 def io @io end |
#lastReadError ⇒ Object
Returns the value of attribute lastReadError.
353 354 355 |
# File 'lib/quartz_torrent/reactor.rb', line 353 def lastReadError @lastReadError end |
#metainfo ⇒ Object
Returns the value of attribute metainfo.
351 352 353 |
# File 'lib/quartz_torrent/reactor.rb', line 351 def end |
#outputBuffer ⇒ Object
Returns the value of attribute outputBuffer.
355 356 357 |
# File 'lib/quartz_torrent/reactor.rb', line 355 def outputBuffer @outputBuffer end |
#readFiber ⇒ Object
Returns the value of attribute readFiber.
356 357 358 |
# File 'lib/quartz_torrent/reactor.rb', line 356 def readFiber @readFiber end |
#readFiberIoFacade ⇒ Object
Returns the value of attribute readFiberIoFacade.
357 358 359 |
# File 'lib/quartz_torrent/reactor.rb', line 357 def readFiberIoFacade @readFiberIoFacade end |
#readRateLimit ⇒ Object
Returns the value of attribute readRateLimit.
360 361 362 |
# File 'lib/quartz_torrent/reactor.rb', line 360 def readRateLimit @readRateLimit end |
#state ⇒ Object
Returns the value of attribute state.
352 353 354 |
# File 'lib/quartz_torrent/reactor.rb', line 352 def state @state end |
#useErrorhandler ⇒ Object
Returns the value of attribute useErrorhandler.
359 360 361 |
# File 'lib/quartz_torrent/reactor.rb', line 359 def useErrorhandler @useErrorhandler end |
#writeRateLimit ⇒ Object
Returns the value of attribute writeRateLimit.
361 362 363 |
# File 'lib/quartz_torrent/reactor.rb', line 361 def writeRateLimit @writeRateLimit end |
Instance Method Details
#seekable? ⇒ Boolean
Is the IO seekable.
364 365 366 |
# File 'lib/quartz_torrent/reactor.rb', line 364 def seekable? @seekable end |