lib/ruby_ftp/client.rb
# Returns the currently opened command socket, or creates a new socket if one does not exist
Returns the currently opened command socket, or creates a new socket if one does not exist
Returns the currently opened command socket or creates a new socket if one does not exist
def command_socket
      return @command_socket if defined?(@command_socket)
      @command_socket = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM)
      @command_socket.connect Socket.pack_sockaddr_in(port, host)
      @banner = @command_socket.gets
      @command_socket
    end
def command_socket return @command_socket if defined? ( @command_socket ) @command_socket = Socket . new ( Socket :: AF_INET , Socket :: SOCK_STREAM ) @command_socket . connect Socket . pack_sockaddr_in ( port , host ) @banner = @command_socket . gets @command_socket end
Returns the currently opened command socket, or creates a new socket if one does not exist
Returns the currently opened command socket or creates a new socket if one does not exist