Class NetworkFacade::TCP::Client
In: lib/network-facade/tcp.rb
Parent: Base::Client

Methods

new  

Public Class methods

[Source]

    # File lib/network-facade/tcp.rb, line 15
15:         def initialize(options = {})
16:             super
17:             @uri.host = 'localhost' if @uri.host.nil? or @uri.host.empty?
18:             @uri.port = PORT if @uri.port.nil?
19:             @options[:no_delay] ||= true
20:             @client ||= TCPSocket.new(@uri.host, @uri.port)
21:             @client.setsockopt(Socket::SOL_TCP, Socket::TCP_NODELAY, 1) if @options[:no_delay]
22:         end

[Validate]