Commit Graph

29 Commits (1934037ee4c3f6b5de8f8c63c5cb226eaf7e0655)

Author SHA1 Message Date
Simon.Dean bd18165181 Reworked Message Handling
- Have adjusted the buffer mechanism so instead of using the buffer to store a message in the event of an interleaved frame, we basically perform all work on the buffer (albeit we take the existing message for the channel id from the buffer for the frame we're working on and write the message to the buffer if the message isn't resolved).
- Moved writing to buffer to receiveFramePayloadHandler() function if the message is BULK or LAST and therefore not resolved.
- Simplified receiveFrameHeaderHandler() so that we automatically try to find a message from the buffer and then createa message as necessary depending on the frame type.
- Excellent stability with no noticeable artefacts in audio after 1 hour.
- Removed majority of debugging after achieving stability.
2022-02-13 21:06:07 +00:00
Simon.Dean f80e72c480 Rework Message Handling.
Slight tweaks
- Add isInterleaved boolean
- If message is NULL and Frame Type is MIDDLE or LAST, then look for an existing message in buffer (if the message_ is null, then we need a FIRST or BULK frame)
- If message is still NULL, then we will create a new message, but recognise it as a valid frame ONLY if this is a FIRST or BULK frame because we cannot start on a MIDDLE or LAST.
- Rename recentFrameType to thisFrameType for more accuracy
- Only Resolve the Frame if the frame is BULK or LAST and the frame is valid.
- If the frame is interleaved, then we will use our interleavedPromise handler. Only resolve the main promise if the frame is not interleaved.
- Also reset message once resolved.
- Carry on reading if the original promise is not resolved (ie FIRST, MIDDLE, or Interleaved frame)
- Add some counters for debugging purposes.
2022-02-11 12:35:07 +00:00
Simon.Dean 5f4220b059 Support FrameType descriptor 2022-02-11 10:33:36 +00:00
Simon.Dean b8bbdf1288 Switch decrypt() to read the number of bytes from the frame size. 2022-02-11 10:29:02 +00:00
Simon.Dean a897fc1a8b Swap getSize() to getFrameSize() and add totalSize() for completeness. 2022-02-11 10:19:12 +00:00
Cole Brinsfield 1f561aa711
voice session and ping (#13) 2020-08-28 17:26:03 -05:00
Jason Wenger f9f02815d0 Rearrange directory structure 2020-07-04 09:37:43 -05:00
Jason Wenger f01d90a692 Fixes for newer boost 2020-05-12 21:53:21 -05:00
Robert Stanley Judka d387974e9d fix interleaved channel crashing #2 2020-05-10 06:18:06 -10:00
Cole Brinsfield 5d7b2bf332 Fixes interleaved channel crashing 2020-05-10 06:07:15 -10:00
michal.szwaj de146367bb Catch stop indication of video channel 2018-07-13 02:46:50 +02:00
michal.szwaj 64bc6bf137 Handle ping request/response 2018-04-04 20:02:36 +02:00
michal.szwaj 718705b50f Remove wrapping of handlers in shared_ptr 2018-03-29 00:08:21 +02:00
michal.szwaj a034d6d02a Remove unnecessary shared_ptr (IoContextWrapper) 2018-03-27 21:09:50 +02:00
michal.szwaj 3c8b87fcf0 Add blocking connect method 2018-03-21 23:49:26 +01:00
michal.szwaj cc4557246d Use socket as a shared_ptr to fulfill boost asio CompletionHandler requirements 2018-03-19 21:30:02 +01:00
michal.szwaj e5caefb53e Implementation of connected device enumerator 2018-03-17 01:17:40 +01:00
michal.szwaj a5ed15f158 Unit tests for TCPEndpoint 2018-03-16 18:59:55 +01:00
michal.szwaj 175dfa6b60 Use Transport base class in TCPTransport 2018-03-15 18:28:02 +01:00
michal.szwaj 1c95f086b7 Create base class for transports 2018-03-15 17:59:18 +01:00
michal.szwaj 36833be832 Remove USBDataSink 2018-03-13 17:22:35 +01:00
michal.szwaj b8bcf7cbef USBDataSink renamed to DataSink 2018-03-13 17:20:37 +01:00
michal.szwaj 219d8dd525 Wrap all used socket functions 2018-03-13 17:20:00 +01:00
michal.szwaj e5e72d1eda Implementation of TCPTransport 2018-03-12 17:53:31 +01:00
michal.szwaj eb98ceadf5 Implement sceleton of TCP interface 2018-03-12 16:43:35 +01:00
michal.szwaj@o2.pl 529fe29bcc Fix issue with winsock.h conflict for MinGW w64 2018-03-10 13:15:20 +01:00
Wojciech 0ff7365c3b
Fix MacOS build issue
In file included from /Users/duxet/git/aasdk/src/Channel/ServiceChannel.cpp:19:
In file included from /Users/duxet/git/aasdk/include/f1x/aasdk/IO/PromiseLink.hpp:23:
/Users/duxet/git/aasdk/include/f1x/aasdk/Error/Error.hpp:47:17: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
    std::string message_;
2018-02-27 10:43:05 +01:00
michal.szwaj bd67b8aadc Make getter for channelId const method 2018-02-12 16:07:44 +01:00
michal.szwaj 9bcecbc977 Initial commit 2018-02-11 20:36:55 +01:00