Module: SocketUtil

Included in:
Mongo::SSLSocket, Mongo::TCPSocket
Defined in:
lib/mongo/util/socket_util.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pidObject

Returns the value of attribute pid.



3
4
5
# File 'lib/mongo/util/socket_util.rb', line 3

def pid
  @pid
end

#poolObject

Returns the value of attribute pool.



3
4
5
# File 'lib/mongo/util/socket_util.rb', line 3

def pool
  @pool
end

Instance Method Details

#checkinObject



9
10
11
# File 'lib/mongo/util/socket_util.rb', line 9

def checkin
  @pool.checkin(self) if @pool
end

#checkoutObject



5
6
7
# File 'lib/mongo/util/socket_util.rb', line 5

def checkout
  @pool.checkout if @pool
end

#closeObject



13
14
15
# File 'lib/mongo/util/socket_util.rb', line 13

def close
  @socket.close unless closed?
end

#closed?Boolean



17
18
19
# File 'lib/mongo/util/socket_util.rb', line 17

def closed?
  @socket.closed?
end