[Quickfix-developers] Reading FIX message from Exchange/Broker server
Brought to you by:
orenmnero
|
From: Ming C. <che...@ho...> - 2021-08-06 08:42:59
|
Hi,
void SocketConnection::readFromSocket()
EXCEPT ( SocketRecvFailed )
{
ssize_t size = socket_recv( m_socket, m_buffer, sizeof(m_buffer) );
if( size <= 0 ) throw SocketRecvFailed( size );
m_parser.addToStream( m_buffer, size );
}
ssize_t socket_recv(socket_handle s, char* buf, size_t length )
{
return recv( s, buf, length, 0 );
}
Question:
* How to make sure FIX messages are always < BUFSIZ (8192 on developer's linux for example)? Say a message with many groups and some repeatingNo could be quite big?
* (Here I am not sure but like to learn) that recv can always read a complete message?
Thanks.
Ming
|