Class | Net::SSH::Transport::ServerVersion |
In: |
lib/net/ssh/transport/server_version.rb
lib/net/ssh/transport/server_version.rb |
Parent: | Object |
Negotiates the SSH protocol version and trades information about server and client. This is never used directly—it is always called by the transport layer as part of the initialization process of the transport layer.
Note that this class also encapsulates the negotiated version, and acts as the authoritative reference for any queries regarding the version in effect.
header | [R] | Any header text sent by the server prior to sending the version. |
header | [R] | Any header text sent by the server prior to sending the version. |
version | [R] | The version string reported by the server. |
version | [R] | The version string reported by the server. |
Instantiates a new ServerVersion and immediately (and synchronously) negotiates the SSH protocol in effect, using the given socket.
# File lib/net/ssh/transport/server_version.rb, line 28 28: def initialize(socket, logger) 29: @header = "" 30: @version = nil 31: @logger = logger 32: negotiate!(socket) 33: end
Instantiates a new ServerVersion and immediately (and synchronously) negotiates the SSH protocol in effect, using the given socket.
# File lib/net/ssh/transport/server_version.rb, line 28 28: def initialize(socket, logger) 29: @header = "" 30: @version = nil 31: @logger = logger 32: negotiate!(socket) 33: end