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, #pending_writes?, #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)


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

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

Instance Method Details

#closed?Boolean

Returns:

  • (Boolean)


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

def closed?
  @socket.to_io.closed?
end

#recv(count) ⇒ Object



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

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

#send(mesg, flags) ⇒ Object



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

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