123456789_123456789_123456789_123456789_123456789_

Class: Net::FTP::BufferedSSLSocket

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, BufferedSocket, BufferedIO
Instance Chain:
self, BufferedSocket, BufferedIO
Inherits: Net::FTP::BufferedSocket
Defined in: lib/net/ftp.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(*args) ⇒ BufferedSSLSocket

[ GitHub ]

  
# File 'lib/net/ftp.rb', line 1472

def initialize(*args)
  super
  @is_shutdown = false
end

Instance Method Details

#rbuf_fill (private)

[ GitHub ]

  
# File 'lib/net/ftp.rb', line 1491

def rbuf_fill
  if @is_shutdown
    raise EOFError, "shutdown has been called"
  else
    super
  end
end

#send(mesg, flags, dest = nil)

[ GitHub ]

  
# File 'lib/net/ftp.rb', line 1484

def send(mesg, flags, dest = nil)
  # Ignore flags and dest.
  @io.write(mesg)
end

#shutdown(*args)

[ GitHub ]

  
# File 'lib/net/ftp.rb', line 1477

def shutdown(*args)
  # SSL_shutdown() will be called from SSLSocket#close, and
  # SSL_shutdown() will send the "close notify" alert to the peer,
  # so shutdown(2) should not be called.
  @is_shutdown = true
end