lib/onstomp/connections/base.rb in onstomp-1.0.0 vs lib/onstomp/connections/base.rb in onstomp-1.0.1
- old
+ new
@@ -11,13 +11,13 @@
MAX_BYTES_PER_WRITE = 1024 * 8
# The maximum number of bytes to read per call to {#io_process_read}
MAX_BYTES_PER_READ = 1024 * 4
# Creates a new connection using the given {#socket} object and
- # {OnStomp::Client client}. The {#socket} object will generally be a +TCPSocket+
- # or an +OpenSSL::SSL::SSLSocket+ and must support the methods +read_nonblock+
- # +write_nonblock+, and +close+.
+ # {OnStomp::Client client}. The {#socket} object will generally be a `TCPSocket`
+ # or an +OpenSSL::SSL::SSLSocket+ and must support the methods `read_nonblock`
+ # `write_nonblock`, and `close`.
# @param [TCPSocket,OpenSSL::SSL::SSLSocket] socket
# @param [OnStomp::Client] client
def initialize socket, client
@socket = socket
@write_mutex = Mutex.new
@@ -27,11 +27,11 @@
@client = client
@connection_up = false
end
# Performs any necessary configuration of the connection from the CONNECTED
- # frame sent by the broker and a +Hash+ of pending callbacks. This method
+ # frame sent by the broker and a `Hash` of pending callbacks. This method
# is called after the protocol negotiation has taken place between client
# and broker, and the connection that receives it will be the connection
# used by the client for the duration of the session.
# @param [OnStomp::Components::Frame] connected
# @param [{Symbol => Proc}] con_cbs
@@ -44,10 +44,10 @@
# @return [true,false]
def connected?
!socket.closed?
end
- # Closes the {#socket}. If +blocking+ is true, the socket will be closed
+ # Closes the {#socket}. If `blocking` is true, the socket will be closed
# immediately, otherwies the socket will remain open until {#io_process_write}
# has finished writing all of its buffered data. Once this method has been
# invoked, {#write_frame_nonblock} will not enqueue any additional frames
# for writing.
# @param [true,false] blocking