class STOMP::IOClient

Defined in:

stomp/io_client.cr

Constructors

Instance Method Summary

Instance methods inherited from class STOMP::Client

abort(transaction, headers : HTTP::Headers = HTTP::Headers.new) abort, ack(id, headers : HTTP::Headers = HTTP::Headers.new, transaction = nil) ack, begin(transaction, headers : HTTP::Headers = HTTP::Headers.new) begin, commit(transaction, headers : HTTP::Headers = HTTP::Headers.new) commit, connect connect, connected? : Bool connected?, disconnect(receipt, headers : HTTP::Headers = HTTP::Headers.new) disconnect, heart_beat heart_beat, heart_beat_client : Tuple(Int32, Int32) | Nil heart_beat_client, heart_beat_server : Tuple(Int32, Int32) | Nil heart_beat_server, host : String host, nack(id, headers : HTTP::Headers = HTTP::Headers.new, transaction = nil) nack, negotiate(stream) negotiate, next_frame(stream) : Frame next_frame, send(destination : String, headers : HTTP::Headers = HTTP::Headers.new, body : String = "", send_content_length : Bool = true) send, server : String | Nil server, session : String | Nil session, stomp(username : String | Nil = nil, password : String | Nil = nil, heart_beat : Tuple(Int32, Int32) | Nil = nil) stomp, subscribe(id, destination : String, headers : HTTP::Headers = HTTP::Headers.new, ack : AckMode = AckMode::Auto) subscribe, unsubscribe(id, headers : HTTP::Headers = HTTP::Headers.new) unsubscribe, version : Version version

Constructor methods inherited from class STOMP::Client

new(host : String) new

Constructor Detail

def self.new(host, socket : IO, send_acknowledgements : Bool = true) #

[View source]

Instance Method Detail

def close(receipt = "disconnect", headers : HTTP::Headers = HTTP::Headers.new, unceremoniously = false) : Nil #

[View source]
def closed? : Bool #

[View source]
def on_close(&on_close : Bool -> ) #

Called when the connection is closed. True when closed gracefully


[View source]
def on_connected(&on_connected : Frame -> ) #

Called when the client receives a message from a server.


[View source]
def on_error(&on_error : Frame -> ) #

[View source]
def on_message(&on_message : Frame -> ) #

Called when the client receives a message from a server.


[View source]
def on_receipt(&on_receipt : Frame -> ) #

[View source]
def run(*args, **named) : Nil #

Continuously receives messages and calls previously set callbacks until the socket is closed.


[View source]
def send(message : Frame) : Nil #

[View source]
def send_heart_beat : Nil #

[View source]