Photon Voice  v2.8
English | 日本語 | 한국
Public Member Functions | List of all members
BufferReaderPushAdapterAsyncPool< T > Class Template Reference

BufferReaderPushAdapter implementation using asynchronous LocalVoice.PushDataAsync. More...

Inherits BufferReaderPushAdapterBase< T >.

Public Member Functions

 BufferReaderPushAdapterAsyncPool (LocalVoice localVoice, IDataReader< T > reader)
 Create a new BufferReaderPushAdapter instance More...
 
override void Service (LocalVoice localVoice)
 Do the actual data read/push. More...
 
- Public Member Functions inherited from BufferReaderPushAdapterBase< T >
 BufferReaderPushAdapterBase (IDataReader< T > reader)
 Create a new BufferReaderPushAdapterBase instance More...
 
void Dispose ()
 Release resources associated with this instance. More...
 

Additional Inherited Members

- Protected Attributes inherited from BufferReaderPushAdapterBase< T >
IDataReader< T > reader
 

Detailed Description

BufferReaderPushAdapter implementation using asynchronous LocalVoice.PushDataAsync.

Acquires a buffer from pool before each Read, releases buffer after last Read (brings Acquire/Release overhead).

Expects localVoice to be a LocalVoiceFramed<T> of same T.

Constructor & Destructor Documentation

BufferReaderPushAdapterAsyncPool ( LocalVoice  localVoice,
IDataReader< T >  reader 
)

Create a new BufferReaderPushAdapter instance

Parameters
localVoiceLocalVoice instance to push data to.
readerDataReader to read from.

Member Function Documentation

override void Service ( LocalVoice  localVoice)
virtual

Do the actual data read/push.

Parameters
localVoiceLocalVoice instance to push data to. Must be a LocalVoiceFramed<T> of same T.

Implements BufferReaderPushAdapterBase< T >.