Sending Messages
To send a message to a counterparty, use the OnixS::ICE::BOE::Session::send method. The Handler sets all session-level fields automatically (e.g., SeqNum, SendingTimeEpoch).
- Note
- The session should be fully established before sending application-level messages.
Receiving Messages
To receive messages, override corresponding methods of the OnixS::ICE::BOE::SessionListener class and pass the instance of the descendant class to the OnixS::ICE::BOE::Session's constructor.
Example
{
public:
void onExecutionReport_New(const ExecutionReport_New msg, Session* ) override
{
std::clog << msg << std::endl;
}
};
settings.licenseStore("../../license")
.userId("SessionId")
.rawData("rawData")
.ipSessionToken("ipSessionToken");
session.connect(host, port);
NewOrderSingle order;
.clOrdId(123)
.orderQty(1000)
.price(999);
session.send(order);
session.disconnect();