Class: Async::IO::TCPSocket::StreamWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/async/io/tcp_socket.rb

Instance Method Summary collapse

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

#closeObject



40
41
42
# File 'lib/async/io/tcp_socket.rb', line 40

def close
	@io.close
end

#flushObject



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