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

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

Overview

This is a wrapper around a tcp socket.

Since:

  • 0.0.1

Instance Method Summary collapse

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:

  • 0.0.1



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

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