module Fix::Engine::ClientConnection
The client connection wrapper, used in order to connect a remote FIX server
Attributes
username[RW]
Public Instance Methods
on_logon(msg)
click to toggle source
Consider ourselves logged-in if we receive on of these
# File lib/fix/engine/client_connection.rb, line 43 def on_logon(msg) @logged_in = true end
post_init()
click to toggle source
Run after we’ve connected to the server
Calls superclass method
Fix::Engine::Connection#post_init
# File lib/fix/engine/client_connection.rb, line 18 def post_init super log("Connecting to server sending a logon message with our COMP_ID <#{@comp_id}>") @logged_in = false EM.next_tick { send_logon } end
send_logon()
click to toggle source
Sends a logon message to the server we’re connected to
# File lib/fix/engine/client_connection.rb, line 31 def send_logon logon = FP::Messages::Logon.new logon.username = @username logon.target_comp_id = @peer_comp_id logon.sender_comp_id = @comp_id logon.reset_seq_num_flag = true send_msg(logon) end