pub struct FixApplicationInitiator { /* private fields */ }Expand description
A struct that can initiate the TCP connection to the peer and create a FIX engine instance.
Implementations§
Source§impl FixApplicationInitiator
impl FixApplicationInitiator
Sourcepub fn build(
settings: SessionSettings,
) -> Result<FixApplicationInitiator, ApplicationError>
pub fn build( settings: SessionSettings, ) -> Result<FixApplicationInitiator, ApplicationError>
Build a FixApplicationInitiator that will create a FIX engine using settings.
Sourcepub async fn initiate(
self,
) -> Result<(FixApplicationHandle, UnboundedReceiver<Arc<MsgBuf>>), ApplicationError>
pub async fn initiate( self, ) -> Result<(FixApplicationHandle, UnboundedReceiver<Arc<MsgBuf>>), ApplicationError>
Initiate a TCP connection and start the FIX engine with the current asynchronous runtime.
If the connection is successfully made, a FixApplicationHandle will be returned, and an
UnboundedReceiver<Arc<MsgBuf>> will be returned.
The application handle can be used to start the FIX connection, send messages and end the connection.
The receiver is a channel where all incoming, valid application messages can be received.
If you do not want to use the channel, it is recommended you call close.
Sourcepub fn initiate_with_runtime(
self,
runtime: Runtime,
) -> Result<(FixApplicationHandle, UnboundedReceiver<Arc<MsgBuf>>), ApplicationError>
pub fn initiate_with_runtime( self, runtime: Runtime, ) -> Result<(FixApplicationHandle, UnboundedReceiver<Arc<MsgBuf>>), ApplicationError>
Initiate a TCP connection and start the FIX engine that will be driven by runtime.
Sourcepub fn initiate_sync(
self,
) -> Result<(FixApplicationHandle, UnboundedReceiver<Arc<MsgBuf>>), ApplicationError>
pub fn initiate_sync( self, ) -> Result<(FixApplicationHandle, UnboundedReceiver<Arc<MsgBuf>>), ApplicationError>
Initiate a TCP connection, and a runtime will be created internally to drive the engine.