Class: Net::SSH::Authentication::Pageant::Socket

Class | Net::SSH::Authentication::Pageant::Socket
In: | lib/net/ssh/authentication/pageant.rb
Parent: | Object

This is the pseudo-socket implementation that mimics the interface of a socket, translating each request into a Windows messaging call to the pageant daemon. This allows pageant support to be implemented simply by replacing the socket factory used by the Agent class.

### Methods

close closed? new open read send send_query

### Public Class methods

new()

Create a new instance that communicates with the running pageant instance. If no such instance is running, this will cause an error.

open(location=nil)

The factory method for creating a new Socket instance. The location parameter is ignored, and is only needed for compatibility with the general Socket interface.

### Public Instance methods

close()

Conceptually close the socket. This doesn‘t really do anthing significant, but merely complies with the Socket interface.

closed?()

Conceptually asks if the socket is closed. As with close, this doesn‘t really do anything significant, but merely complies with the Socket interface.

read(n = nil)

Reads `n` bytes from the cached result of the last query. If `n` is `nil`, returns all remaining data from the last query.

send(data, *args)

Forwards the data to send_query, ignoring any arguments after the first. Returns 0.

send_query(query)

Packages the given query string and sends it to the pageant process via the Windows messaging subsystem. The result is cached, to be returned piece-wise when read is called.

[Validate]