Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/ib_ruby_proxy/server/ib_client_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def initialize(ib_client, ib_wrapper_adapter)
@ib_wrapper_adapter = ib_wrapper_adapter
end

def ib_client_connected?
@ib_client.isConnected
end

# @param [IbRubyProxy::Client::IbCallbacksObserver] ib_callbacks_observer
def add_ib_callbacks_observer(ib_callbacks_observer)
ib_wrapper_adapter.add_observer(ib_callbacks_observer)
Expand Down
4 changes: 2 additions & 2 deletions lib/ib_ruby_proxy/server/ib_proxy_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ module Server
# * Starts an IB message-processing thread that will dispatch messages sent to IB client app (
# gateway or TWS)
class IbProxyService
DEFAULT_IB_HOST = 'localhost'
DEFAULT_IB_HOST = 'localhost'.freeze
DEFAULT_IB_GATEWAY_PORT = 4002
DEFAULT_DRB_HOST = 'localhost'
DEFAULT_DRB_HOST = 'localhost'.freeze
DEFAULT_DRB_PORT = 1992

# @param [String] ib_host Hostname for the IB client app (gateway or TWS). Default +localhost+
Expand Down