fix8  version 1.4.0
Open Source C++ FIX Framework
FIX8::ServerConnection Class Reference

Server (acceptor) specialisation of Connection. More...

#include <connection.hpp>

Inheritance diagram for FIX8::ServerConnection:
FIX8::Connection

Public Member Functions

 ServerConnection (Poco::Net::StreamSocket *sock, Poco::Net::SocketAddress &addr, Session &session, unsigned hb_interval, ProcessModel pmodel=pm_pipeline, bool no_delay=true, bool reuse_addr=false, int linger=-1, bool keepalive=false, bool secured=false)
 
virtual ~ServerConnection ()
 Dtor. More...
 
- Public Member Functions inherited from FIX8::Connection
 Connection (Poco::Net::StreamSocket *sock, Poco::Net::SocketAddress &addr, Session &session, Role role, const ProcessModel pmodel, unsigned hb_interval, bool secured)
 
virtual ~Connection ()
 Dtor. More...
 
Role get_role () const
 
ProcessModel get_pmodel () const
 
bool is_secure () const
 
F8API void start ()
 Start the reader and writer threads. More...
 
F8API void stop ()
 Stop the reader and writer threads. More...
 
virtual bool connect ()
 
bool is_connected () const
 
virtual bool write (Message *from, bool destroy=true)
 
virtual bool write (Message &from)
 
size_t write_batch (const std::vector< Message * > &msgs, bool destroy)
 
int send (const char *from, size_t sz)
 
int send (const f8String &from)
 
void set_hb_interval (const unsigned hb_interval)
 
unsigned get_hb_interval () const
 
unsigned get_hb_interval20pc () const
 
Poco::Net::SocketAddress get_peer_socket_address () const
 
const Poco::Net::SocketAddress & get_socket_address () const
 
int join ()
 
bool is_socket_error () const
 
void set_recv_buf_sz (const unsigned sz) const
 
void set_send_buf_sz (const unsigned sz) const
 
void set_tcp_cork_flag (bool way) const
 
Sessionget_session ()
 
int reader_execute ()
 
bool reader_poll (const Poco::Timespan &ts=Poco::Timespan()) const
 
int writer_execute ()
 
bool writer_poll (const Poco::Timespan &ts=Poco::Timespan()) const
 

Additional Inherited Members

- Public Types inherited from FIX8::Connection
enum  Role { cn_acceptor, cn_initiator, cn_unknown }
 Roles: acceptor, initiator or unknown. More...
 
- Static Public Member Functions inherited from FIX8::Connection
static void set_recv_buf_sz (const unsigned sz, Poco::Net::Socket *sock)
 
static void set_send_buf_sz (const unsigned sz, Poco::Net::Socket *sock)
 
- Protected Attributes inherited from FIX8::Connection
Poco::Net::StreamSocket * _sock
 
Poco::Net::SocketAddress _addr
 
f8_atomic< bool > _connected
 
Session_session
 
Role _role
 
ProcessModel _pmodel
 
unsigned _hb_interval
 
unsigned _hb_interval20pc
 
FIXReader _reader
 
FIXWriter _writer
 
bool _secured
 

Detailed Description

Server (acceptor) specialisation of Connection.

Definition at line 722 of file connection.hpp.

Constructor & Destructor Documentation

FIX8::ServerConnection::ServerConnection ( Poco::Net::StreamSocket *  sock,
Poco::Net::SocketAddress &  addr,
Session session,
unsigned  hb_interval,
ProcessModel  pmodel = pm_pipeline,
bool  no_delay = true,
bool  reuse_addr = false,
int  linger = -1,
bool  keepalive = false,
bool  secured = false 
)
inline

Ctor. Acceptor.

Parameters
sockconnected socket
addrsock address structure
sessionsession
hb_intervalheartbeat interval
pmodelprocess model
no_delayset or clear the tcp no delay flag on the socket
reuse_addrset or clear the resueaddr flag on the socket
lingerset the tcp linger value (secs) on the socket, -1=disable
keepaliveset or clear the tcp keepalive flag on the socket
securedtrue for ssl connection

Definition at line 737 of file connection.hpp.

739  :
740  Connection(sock, addr, session, cn_acceptor, pmodel, hb_interval, secured)
741  {
742  _sock->setLinger(linger >= 0, linger);
743  _sock->setNoDelay(no_delay);
744  _sock->setReuseAddress(reuse_addr);
745  _sock->setKeepAlive(keepalive);
746  }
Poco::Net::StreamSocket * _sock
Definition: connection.hpp:515
Connection(Poco::Net::StreamSocket *sock, Poco::Net::SocketAddress &addr, Session &session, Role role, const ProcessModel pmodel, unsigned hb_interval, bool secured)
Definition: connection.hpp:537
virtual FIX8::ServerConnection::~ServerConnection ( )
inlinevirtual

Dtor.

Definition at line 749 of file connection.hpp.

749 {}

The documentation for this class was generated from the following file: