Class: RBus::Transport::UNIXTransport
- Inherits:
-
AbstractTransport
- Object
- AbstractTransport
- RBus::Transport::UNIXTransport
- Defined in:
- lib/rbus/bus/transport.rb
Overview
Represents a connection to a UNIX Socket, abstract or regular.
Constant Summary
Constants inherited from AbstractTransport
Instance Attribute Summary
Attributes inherited from AbstractTransport
Instance Method Summary collapse
Methods inherited from AbstractTransport
#close, #initialize, #read, #readline, #send, #sendline
Constructor Details
This class inherits a constructor from RBus::Transport::AbstractTransport
Instance Method Details
#create_socket ⇒ Object
70 71 72 73 74 75 76 77 |
# File 'lib/rbus/bus/transport.rb', line 70 def create_socket if @connection_info.has_key?('abstract') @socket = Socket.new(Socket::AF_UNIX, Socket::SOCK_STREAM, 0) @socket.connect("\1\0\0#{@connection_info['abstract']}") elsif @connection_info.has_key?('path') @socket = UNIXSocket.open(@connection_info['path']) end end |