method
disconnect
v2_2_9 -
Show latest stable
- Class:
Net::IMAP
disconnect()public
Disconnects from the server.
# File lib/net/imap.rb, line 315
def disconnect
begin
begin
# try to call SSL::SSLSocket#io.
@sock.io.shutdown
rescue NoMethodError
# @sock is not an SSL::SSLSocket.
@sock.shutdown
end
rescue Errno::ENOTCONN
# ignore `Errno::ENOTCONN: Socket is not connected' on some platforms.
rescue Exception => e
@receiver_thread.raise(e)
end
@receiver_thread.join
synchronize do
unless @sock.closed?
@sock.close
end
end
raise e if e
end Related methods
- Instance methods
- add_response_handler
- append
- authenticate
- capability
- check
- close
- copy
- create
- delete
- disconnect
- disconnected?
- examine
- expunge
- fetch
- getacl
- getquota
- getquotaroot
- idle
- idle_done
- list
- login
- logout
- lsub
- noop
- remove_response_handler
- rename
- search
- select
- setacl
- setquota
- sort
- starttls
- status
- store
- subscribe
- thread
- uid_copy
- uid_fetch
- uid_search
- uid_sort
- uid_store
- uid_thread
- unsubscribe
- xlist
- Class methods
- add_authenticator
- debug
- debug=
- decode_utf7
- default_imap_port
- default_imaps_port
- default_port
- default_ssl_port
- default_tls_port
- encode_utf7
- format_date
- format_datetime
- max_flag_count
- max_flag_count=
- new
- Private methods
-
copy_internal -
create_ssl_params -
fetch_internal -
generate_tag -
get_response -
get_tagged_response -
normalize_searching_criteria -
put_string -
receive_responses -
record_response -
search_internal -
send_command -
send_data -
send_list_data -
send_literal -
send_number_data -
send_quoted_string -
send_string_data -
send_symbol_data -
send_time_data -
sort_internal -
start_tls_session -
store_internal -
thread_internal -
validate_data