Class: Proxy::RemoteExecution::Cockpit::MiniSSLBufferedSocket

Inherits:
BufferedSocket
  • Object
show all
Defined in:
lib/smart_proxy_remote_execution_ssh/cockpit.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BufferedSocket

build, #initialize

Methods included from NetSSHCompat::BufferedIO

#available, #enqueue, #fill, #read_available, #send_pending, #wait_for_pending_sends

Constructor Details

This class inherits a constructor from Proxy::RemoteExecution::Cockpit::BufferedSocket

Class Method Details

.applies_for?(socket) ⇒ Boolean

Returns:

  • (Boolean)


93
94
95
# File 'lib/smart_proxy_remote_execution_ssh/cockpit.rb', line 93

def self.applies_for?(socket)
  socket.is_a? ::Puma::MiniSSL::Socket
end

Instance Method Details

#closed?Boolean

Returns:

  • (Boolean)


106
107
108
# File 'lib/smart_proxy_remote_execution_ssh/cockpit.rb', line 106

def closed?
  @socket.to_io.closed?
end

#recv(count) ⇒ Object



98
99
100
# File 'lib/smart_proxy_remote_execution_ssh/cockpit.rb', line 98

def recv(count)
  @socket.read_nonblock(count)
end

#send(mesg, flags) ⇒ Object



102
103
104
# File 'lib/smart_proxy_remote_execution_ssh/cockpit.rb', line 102

def send(mesg, flags)
  @socket.write_nonblock(mesg)
end