class Bones::RPC::Synchronous::Connection::Socket::SSL

This is a wrapper around a tcp socket.

Attributes

socket[R]

Public Class Methods

new(remote_host, remote_port, local_host = nil, local_port = nil) click to toggle source

Initialize the new TCPSocket with SSL.

@example Initialize the socket.

SSL.new("127.0.0.1", 27017)

@param [ String ] host The host. @param [ Integer ] port The port.

@since 0.0.1

Calls superclass method
# File lib/bones/rpc/synchronous/connection/socket/ssl.rb, line 25
def initialize(remote_host, remote_port, local_host = nil, local_port = nil)
  @host, @port = remote_host.to_s, remote_port
  handle_socket_errors do
    @socket = TCPSocket.new(@host, remote_port, local_host, local_port)
    super(socket)
    self.sync_close = true
    connect
  end
end

Public Instance Methods

set_encoding(string) click to toggle source

Set the encoding of the underlying socket.

@param [ String ] string The encoding.

@since 0.0.1

# File lib/bones/rpc/synchronous/connection/socket/ssl.rb, line 40
def set_encoding(string)
  socket.set_encoding(string)
end
setsockopt(*args) click to toggle source

Set a socket option on the underlying socket.

@param [ Array<Object> ] args The option arguments.

@since 0.0.1

# File lib/bones/rpc/synchronous/connection/socket/ssl.rb, line 49
def setsockopt(*args)
  socket.setsockopt(*args)
end