Class: Mongo::Socket::Unix Private
- Inherits:
-
Mongo::Socket
- Object
- Mongo::Socket
- Mongo::Socket::Unix
- Defined in:
- lib/mongo/socket/unix.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
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
private
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
private
Initializes a new Unix socket.
Methods inherited from Mongo::Socket
#alive?, #close, #connectable?, #connection_address, #connection_generation, #eof?, #gets, #monitor?, #read, #readbyte, #summary, #write
Constructor Details
#initialize(path, timeout, options = {}) ⇒ Unix
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initializes a new Unix socket.
45 46 47 48 49 50 |
# File 'lib/mongo/socket/unix.rb', line 45 def initialize(path, timeout, = {}) super(timeout, ) @path = path @socket = ::UNIXSocket.new(path) (@socket) end |
Instance Attribute Details
#path ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns path The path to connect to.
53 54 55 |
# File 'lib/mongo/socket/unix.rb', line 53 def path @path end |