| Class | Mongo::Server::ConnectionBase |
| In: |
lib/mongo/server/connection_base.rb
|
| Parent: | Object |
This class encapsulates common connection functionality.
@note Although methods of this module are part of the public API,
the fact that these methods are defined on this module and not on the classes which include this module is not part of the public API.
@api semipublic
| options | [R] | @return [ Hash ] options The passed in options. |
Dispatch a single message to the connection. If the message requires a response, a reply will be returned.
@example Dispatch the message.
connection.dispatch([ insert ])
@note This method is named dispatch since ‘send’ is a core Ruby method on
all objects.
@note For backwards compatibility, this method accepts the messages
as an array. However, exactly one message must be given per invocation.
@param [ Array<Message> ] messages A one-element array containing
the message to dispatch.
@param [ Integer ] operation_id The operation id to link messages.
@return [ Protocol::Message | nil ] The reply if needed.
@since 2.0.0