Skip to content

Commit becec4e

Browse files
committed
🚚 Move SASL::ClientAdapter#host and #port
These were moved from SASL::ProtocolAdapters::Generic because they are mostly specific to client implementation, not protocol specification.
1 parent 585bf65 commit becec4e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/net/imap/sasl/client_adapter.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ def run_command(mechanism, initial_response = nil, &continuations_handler)
7979
command_proc.call(*args, &continuations_handler)
8080
end
8181

82+
# The hostname to which the client connected.
83+
def host; client.host end
84+
85+
# The destination port to which the client connected.
86+
def port; client.port end
87+
8288
# Returns an array of server responses errors raised by run_command.
8389
# Exceptions in this array won't drop the connection.
8490
def response_errors; [] end

lib/net/imap/sasl/protocol_adapters.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ module ProtocolAdapters
99
module Generic
1010
def command_name; "AUTHENTICATE" end
1111
def service; raise "Implement in subclass or module" end
12-
def host; client.host end
13-
def port; client.port end
1412
def encode_ir(string) string.empty? ? "=" : encode(string) end
1513
def encode(string) [string].pack("m0") end
1614
def decode(string) string.unpack1("m0") end

0 commit comments

Comments
 (0)