Class: NetworkFacade::TCP::Client
- Inherits:
-
Base::Client
- Object
- Base::Client
- NetworkFacade::TCP::Client
- Defined in:
- lib/network-facade/tcp.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods inherited from Base::Client
#__read__, #__write__, inherited, #method_missing, uri=
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
12 13 14 15 16 17 |
# File 'lib/network-facade/tcp.rb', line 12 def initialize( = {}) super @options[:no_delay] ||= true @client ||= TCPSocket.new(@uri.host || 'localhost', @uri.port || PORT) @client.setsockopt(Socket::SOL_TCP, Socket::TCP_NODELAY, 1) if @options[:no_delay] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NetworkFacade::Base::Client