Class: Bones::RPC::Connection::Socket::TCP

Inherits:
Celluloid::IO::TCPSocket
  • Object
show all
Includes:
Connectable
Defined in:
lib/bones/rpc/connection/socket/tcp.rb

Overview

This is a wrapper around a ssl socket.

Since:

  • 2.0.0

Instance Attribute Summary

Attributes included from Connectable

#host, #port

Instance Method Summary collapse

Methods included from Connectable

#alive?, included, #read, #readpartial, #set_encoding, #write

Constructor Details

#initialize(remote_host, remote_port, local_host = nil, local_port = nil) ⇒ TCP

Initialize the new TCPSocket.

Examples:

Initialize the socket.

TCP.new("127.0.0.1", 27017)

Parameters:

  • remote_host (String)

    The host.

  • remote_port (Integer)

    The port.

Since:

  • 1.2.0


20
21
22
23
# File 'lib/bones/rpc/connection/socket/tcp.rb', line 20

def initialize(remote_host, remote_port, local_host = nil, local_port = nil)
  @host, @port = remote_host, remote_port
  handle_socket_errors { super }
end