Class: Mongo::Socket::Unix
- Inherits:
-
Mongo::Socket
- Object
- Mongo::Socket
- Mongo::Socket::Unix
- Defined in:
- lib/mongo/socket/unix.rb
Overview
Wrapper for Unix sockets.
Constant Summary
Constants inherited from Mongo::Socket
SSL_ERROR, TIMEOUT_ERROR, TIMEOUT_PACK, WRITE_CHUNK_SIZE
Instance Attribute Summary collapse
-
#path ⇒ String
readonly
Path The path to connect to.
Attributes inherited from Mongo::Socket
#family, #options, #socket, #timeout
Instance Method Summary collapse
-
#initialize(path, timeout, options = {}) ⇒ Unix
constructor
Initializes a new Unix socket.
Methods inherited from Mongo::Socket
#alive?, #close, #connectable?, #eof?, #gets, #read, #readbyte, #write
Constructor Details
#initialize(path, timeout, options = {}) ⇒ Unix
Initializes a new Unix socket.
38 39 40 41 42 |
# File 'lib/mongo/socket/unix.rb', line 38 def initialize(path, timeout, = {}) @path, @timeout, @options = path, timeout, @socket = ::UNIXSocket.new(path) (@socket) end |
Instance Attribute Details
#path ⇒ String (readonly)
Returns path The path to connect to.
24 25 26 |
# File 'lib/mongo/socket/unix.rb', line 24 def path @path end |