• Programmer’s Guide
  • Api Documentation
  • FIX Session Initiator
Show / Hide Table of Contents
  • License Agreement
  • Release Notes
  • Backgrounder
    • About FIX
    • About FIX messages
    • About FIX sessions
    • About FIX 5.0
  • Installation And Uninstallation
    • Requirements & Compatibility
    • Supported Features
    • Samples descriptions
    • Uninstallation instructions
  • Quick Start
    • Session acceptor creation
    • Session initiator creation
    • Creating new order
    • Sending order
    • Processing incoming message
    • Closing session
    • Sample application
  • Basic Concepts
    • Main components
    • FixServer description
    • IFixServerListener description
    • IFixSessionListener description
    • IFixSession description
    • Repeating Groups description
    • Message validation
  • FIX Session Acceptor
    • Create
    • Connect
    • Reject
    • Reconnect
    • Disconnect
    • Release
    • Send message
  • FIX Session Initiator
    • Create
    • Establish connection
    • Reconnect
    • Disconnect
    • Dispose
    • Send message
  • FIX Session
    • Persistent session
    • Session state
    • Sequence number handling
    • Session qualifier
  • FIX Message
    • Create
    • Get field
    • Add field
    • Set field
    • Remove field
    • Repeating group
    • User defined fields
    • Clone message
  • FIX Prepared Message
    • Create
    • Add field
    • Set field
  • Repeating Group API
    • Indexing Repeating Group
    • Working with Repeating Groups through API
    • Repeating Group Pool
    • Get Repeating Group
    • Get Entry
    • Get nested group
    • Add new Repeating Group to message
    • Add new Entry to Repeating Group
    • Remove Entry from Repeating Group
    • Leading tag self-maintaining
    • ITagList interface
    • Validation
    • Copying
    • Finishing work with Repeating Group API
  • Validation
    • Initialization
    • Validation
  • Monitoring and Administration
    • Overview
    • Response result codes
    • Supported commands
  • Recovery
    • Store-and-forward
    • Gap fill
    • Fail-over
  • Configuration
    • Global configuration
    • Server Behavior
    • Queue and Storage
    • Validation
    • Administrative plugin
    • Session’s configuration
    • Configure SeqNum fields length
    • Definition of session’s configuration via properties file
    • Definition of session’s configuration via XML file
    • Loading of session’s configuration
  • TLS Support
    • SSL/TLS configuration
    • How to define an SSL certificate
    • How to use sslPort and requireSsl configuration options
    • Configuration examples
    • Diagnostic and troubleshooting
  • Other Topics
    • Log files
    • FAQ
    • Troubleshooting

FIX Session Initiator

Create

Call the following method to create a session:

IFixSession session = sessionParameters.CreateNewFixSession();

You can use the autoreconnectAttempts configurations parameter set to positive value to create sessions that will try to reconnect if connection is lost.

After the session is created set a listener

session.SetFixSessionListener(IFixSessionListener listener);

After the session is created use the method below to connect it as initiator.

session.Connect();

Establish connection

After session.Connect() is called the initiator starts attempts to establish a FIX session in the background. The following scenario is executed:

  • Establish telecommunication link (TCP/IP)
  • Send Logon message
  • Wait for confirm logon message
  • Move to "established" state

There is no need to wait until connection is established to send messages. If connection is not established, messages will be sent later after connection process succeeds.

Reconnect

Initiator is responsible for restoring a connection once it is broken. When connection error is detected the initiator moves to "Reconnect" state and starts the reconnection process. The foillowing scenario is executed:

  1. Establish telecommunication link
  2. Send Logon message
  3. Repeat from 1 if 1 or 2 fails
  4. Stop trying if attempts are over

The number of reconnection attempts and delay can be set in the properties file.

Disconnect

You can use the following method to disconnect the initiator (the process can also be called "terminate", "delete", "close"):

session.Disconnect(string reason); 

Dispose

To release all session's resources and unregister session use:

session.Dispose();

Send message

To send outgoing application-level messages use on of those methods:

session.SendMessage(string type, FixMessage content)

or

session.SendMessage(FixMessage message)

All session-level messages are sent automatically when needed.

In This Article
  • Create
  • Establish connection
  • Reconnect
  • Disconnect
  • Dispose
  • Send message
Back to top Generated by DocFX