A TCP connection to a client device for providing direct market access.
More...
#include <connection.hpp>
|
typedef std::shared_ptr< Connection > | Pointer |
| a shared pointer type for this connection object
|
|
A TCP connection to a client device for providing direct market access.
◆ create()
Create a shared pointer to a new connection.
- Parameters
-
context | the IO context to create the connection with |
authorizer | the authorizer for credential / account management |
book | the limit order book for the instrument |
- Returns
- a shared pointer to the new connection
◆ get_output_buffer_size()
uint32_t OrderEntry::Connection::get_output_buffer_size |
( |
| ) |
const |
|
inline |
Return the size of the output buffer (number of queued messages).
- Returns
- the number of messages in the outbound queue
◆ get_sequence()
Return the sequence number at this sender.
- Returns
- the sequence number of the next message to send
◆ get_socket()
tcp::socket& OrderEntry::Connection::get_socket |
( |
| ) |
|
|
inline |
Return the socket this connection is using.
- Returns
- the socket this connection is using
◆ is_logged_in()
bool OrderEntry::Connection::is_logged_in |
( |
| ) |
const |
|
inline |
Return true if the connection is authorized, false otherwise.
- Returns
- true if the connection has been authorized (logged in)
◆ trade()
Send a trade message to the client.
- Parameters
-
order_id | the ID of the trade that occurred |
price | the price the trade occurred at |
size | the size of the trade the occurred |
leaves_size | the size left on the order after the trade |
side | the side of the book the trade is for |
The documentation for this class was generated from the following file: