@@ -807,9 +807,11 @@ class IMAP < Protocol
807
807
def self . config ; Config . global end
808
808
809
809
# Returns the global debug mode.
810
+ # Delegates to {Net::IMAP.config.debug}[rdoc-ref:Config#debug].
810
811
def self . debug ; config . debug end
811
812
812
813
# Sets the global debug mode.
814
+ # Delegates to {Net::IMAP.config.debug=}[rdoc-ref:Config#debug=].
813
815
def self . debug = ( val )
814
816
config . debug = val
815
817
end
@@ -830,7 +832,7 @@ class << self
830
832
alias default_ssl_port default_tls_port
831
833
end
832
834
833
- # Returns the initial greeting the server, an UntaggedResponse.
835
+ # Returns the initial greeting sent by the server, an UntaggedResponse.
834
836
attr_reader :greeting
835
837
836
838
# The client configuration. See Net::IMAP::Config.
@@ -839,13 +841,20 @@ class << self
839
841
# Net::IMAP.config.
840
842
attr_reader :config
841
843
842
- # Seconds to wait until a connection is opened.
843
- # If the IMAP object cannot open a connection within this time,
844
- # it raises a Net::OpenTimeout exception. The default value is 30 seconds .
845
- def open_timeout ; config . open_timeout end
844
+ ##
845
+ # :attr_reader: open_timeout
846
+ # Seconds to wait until a connection is opened. Also used by #starttls .
847
+ # Delegates to { config.open_timeout}[rdoc-ref:Config#open_timeout].
846
848
849
+ ##
850
+ # :attr_reader: idle_response_timeout
847
851
# Seconds to wait until an IDLE response is received.
848
- def idle_response_timeout ; config . idle_response_timeout end
852
+ # Delegates to {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout].
853
+
854
+ # :stopdoc:
855
+ def open_timeout ; config . open_timeout end
856
+ def idle_response_timeout ; config . idle_response_timeout end
857
+ # :startdoc:
849
858
850
859
# The hostname this client connected to
851
860
attr_reader :host
@@ -1332,6 +1341,10 @@ def logout!
1332
1341
# both successful. Any error indicates that the connection has not been
1333
1342
# secured.
1334
1343
#
1344
+ # After the server agrees to start a TLS connection, this method waits up to
1345
+ # {config.open_timeout}[rdoc-ref:Config#open_timeout] before raising
1346
+ # +Net::OpenTimeout+.
1347
+ #
1335
1348
# *Note:*
1336
1349
# >>>
1337
1350
# Any #response_handlers added before STARTTLS should be aware that the
0 commit comments