Class Mongo::Socket::SSL
In: lib/mongo/socket/ssl.rb
Parent: Socket

Wrapper for SSL sockets.

@since 2.0.0

Methods

new   readbyte  

Included Modules

OpenSSL

Attributes

context  [R]  @return [ SSLContext ] context The ssl context.
host  [R]  @return [ String ] host The host to connect to.
host_name  [R]  @return [ String ] host_name The original host name.
port  [R]  @return [ Integer ] port The port to connect to.
timeout  [R]  @return [ Float ] timeout The socket timeout.

Public Class methods

Initializes a new SSL socket.

@example Create the SSL socket.

  SSL.new('::1', 27017, 30)

@param [ String ] host The hostname or IP address. @param [ Integer ] port The port number. @param [ Float ] timeout The socket timeout value. @param [ Integer ] family The socket family. @param [ Hash ] options The options.

@option options [ Float ] :connect_timeout Connect timeout.

@since 2.0.0

Public Instance methods

Read a single byte from the socket.

@example Read a single byte.

  socket.readbyte

@return [ Object ] The read byte.

@since 2.0.0

[Validate]