![]() |
fix8
version 1.4.0
Open Source C++ FIX Framework
|
Half duplex async socket wrapper with thread. More...
#include <connection.hpp>
Public Member Functions | |
| AsyncSocket (Poco::Net::StreamSocket *sock, Session &session, const ProcessModel pmodel=pm_pipeline) | |
| virtual | ~AsyncSocket ()=default |
| Dtor. More... | |
| size_t | queued () const |
| bool | started () const |
| int | operator() () |
| virtual int | execute (f8_thread_cancellation_token &cancellation_token) |
| virtual void | start () |
| Start the processing thread. More... | |
| virtual void | request_stop () |
| Start the processing thread. More... | |
| virtual void | quit () |
| Stop the processing thread and quit. More... | |
| Poco::Net::StreamSocket * | socket () |
| int | join () |
| f8_thread_cancellation_token & | cancellation_token () |
Protected Attributes | |
| coroutine | _coro |
| Poco::Net::StreamSocket * | _sock |
| f8_concurrent_queue< T > | _msg_queue |
| Session & | _session |
| ProcessModel | _pmodel |
| f8_thread_cancellation_token | _cancellation_token |
| volatile bool | _started |
| f8_mutex | _start_mutex |
Private Attributes | |
| f8_thread< AsyncSocket > | _thread |
Half duplex async socket wrapper with thread.
| T | the object type to queue |
Definition at line 53 of file connection.hpp.
|
inline |
Ctor.
| sock | connected socket |
| session | session |
| pmodel | process model |
Definition at line 73 of file connection.hpp.
|
virtualdefault |
Dtor.
|
inline |
Obtain the thread cancellation token
Definition at line 129 of file connection.hpp.
Referenced by FIX8::Connection::reader_execute(), and FIX8::Connection::writer_execute().
|
inlinevirtual |
Execute the function operator
Reimplemented in FIX8::FIXWriter, and FIX8::FIXReader.
Definition at line 93 of file connection.hpp.
Referenced by FIX8::AsyncSocket< f8String >::operator()().
|
inline |
Wait till processing thread has finished.
Definition at line 125 of file connection.hpp.
Referenced by FIX8::FIXReader::join(), FIX8::FIXWriter::join(), and FIX8::AsyncSocket< f8String >::quit().
|
inline |
Function operator. Called by thread to process message on queue.
Definition at line 89 of file connection.hpp.
|
inline |
Get the number of messages queued on this socket.
Definition at line 81 of file connection.hpp.
|
inlinevirtual |
Stop the processing thread and quit.
Reimplemented in FIX8::FIXWriter, and FIX8::FIXReader.
Definition at line 117 of file connection.hpp.
Referenced by FIX8::FIXReader::quit(), and FIX8::FIXWriter::quit().
|
inlinevirtual |
Start the processing thread.
Definition at line 114 of file connection.hpp.
Referenced by FIX8::FIXReader::stop(), and FIX8::FIXWriter::stop().
|
inline |
|
inlinevirtual |
Start the processing thread.
Reimplemented in FIX8::FIXWriter, and FIX8::FIXReader.
Definition at line 96 of file connection.hpp.
Referenced by FIX8::FIXReader::start(), and FIX8::FIXWriter::start().
|
inline |
Check if this socket has started
Definition at line 85 of file connection.hpp.
|
protected |
Definition at line 61 of file connection.hpp.
Referenced by FIX8::AsyncSocket< f8String >::cancellation_token().
|
protected |
Definition at line 56 of file connection.hpp.
|
protected |
Definition at line 58 of file connection.hpp.
|
protected |
Definition at line 60 of file connection.hpp.
|
protected |
Definition at line 59 of file connection.hpp.
|
protected |
Definition at line 57 of file connection.hpp.
Referenced by FIX8::AsyncSocket< f8String >::socket().
|
protected |
Definition at line 63 of file connection.hpp.
|
protected |
Definition at line 62 of file connection.hpp.
Referenced by FIX8::AsyncSocket< f8String >::started().
|
private |
Definition at line 66 of file connection.hpp.