Class: Nodule::UnixServer
- Defined in:
- lib/nodule/unixsocket.rb
Instance Attribute Summary
Attributes inherited from Tempfile
Attributes inherited from Base
#prefix, #read_count, #readers, #running, #topology
Instance Method Summary collapse
Methods inherited from Tempfile
Methods inherited from Base
#add_reader, #add_readers, #clear!, #done?, #initialize, #join_topology!, #output, #output!, #output?, #read_until, #require_read_count, #run_readers, #stop, #stop!, #verbose, #wait, #wait_with_backoff
Constructor Details
This class inherits a constructor from Nodule::Tempfile
Instance Method Details
#run ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nodule/unixsocket.rb', line 37 def run super @thread = Thread.new do Thread.current.abort_on_exception server = Socket.new(:UNIX, @family, 0) address = Addrinfo.unix(@file) server.bind(address) , = server.recvmsg(65536, 0) if sock end end |
#to_s ⇒ Object
50 51 52 |
# File 'lib/nodule/unixsocket.rb', line 50 def to_s @sockfile end |