Module Moped::Connection::Socket::Connectable
In: lib/moped/connection/socket/connectable.rb

Methods

alive?   included   read   write  

Classes and Modules

Module Moped::Connection::Socket::Connectable::ClassMethods

Attributes

host  [R] 
port  [R] 

Public Class methods

Bring in the class methods when included.

@example Extend the class methods.

  Connectable.included(class)

@param [ Class ] klass The class including the module.

@since 1.3.0

Public Instance methods

Is the socket connection alive?

@example Is the socket alive?

  socket.alive?

@return [ true, false ] If the socket is alive.

@since 1.0.0

Read from the TCP socket.

@param [ Integer ] length The length to read.

@return [ Object ] The data.

@since 1.2.0

Write to the socket.

@example Write to the socket.

  socket.write(data)

@param [ Object ] args The data to write.

@return [ Integer ] The number of bytes written.

@since 1.0.0

[Validate]