Class: Async::IO::TCPSocket::StreamWrapper
- Inherits:
-
Object
- Object
- Async::IO::TCPSocket::StreamWrapper
- Defined in:
- lib/async/io/tcp_socket.rb
Instance Method Summary collapse
- #close ⇒ Object
- #flush ⇒ Object
-
#initialize(io) ⇒ StreamWrapper
constructor
A new instance of StreamWrapper.
- #read(*args) ⇒ Object
- #sync=(value) ⇒ Object
- #write(*args) ⇒ Object
Constructor Details
#initialize(io) ⇒ StreamWrapper
Returns a new instance of StreamWrapper.
32 33 34 |
# File 'lib/async/io/tcp_socket.rb', line 32 def initialize(io) @io = io end |
Instance Method Details
#close ⇒ Object
40 41 42 |
# File 'lib/async/io/tcp_socket.rb', line 40 def close @io.close end |
#flush ⇒ Object
52 53 54 |
# File 'lib/async/io/tcp_socket.rb', line 52 def flush @io.flush end |
#read(*args) ⇒ Object
44 45 46 |
# File 'lib/async/io/tcp_socket.rb', line 44 def read(*args) @io.sysread(*args) end |
#sync=(value) ⇒ Object
36 37 38 |
# File 'lib/async/io/tcp_socket.rb', line 36 def sync= value @io.sync = value end |
#write(*args) ⇒ Object
48 49 50 |
# File 'lib/async/io/tcp_socket.rb', line 48 def write(*args) @io.syswrite(*args) end |