Alex Bikfalvi
SimStream Documentation
StreamPullReceiver.h
00001 #pragma once 00002 00003 #include "ConnectionTag.h" 00004 #include "ConnectionSender.h" 00005 #include "Timer.h" 00006 00007 class CStreamPullReceiver : public CConnectionTag 00008 { 00009 public: 00010 typedef map<__uint32, CStreamPullReceiver*> TReceiverList; 00011 00012 private: 00013 // Input 00014 CConnectionSender* connection; 00015 __time interval; 00016 00017 // Buffer 00018 queue<CStreamFrame> buffer; 00019 00020 // Timer 00021 CTimer<CStreamPullReceiver>* timer; 00022 00023 // List 00024 __uint32 id; 00025 TReceiverList* list; 00026 00027 public: 00028 CStreamPullReceiver( 00029 CSimHandler* sim, 00030 CConnectionSender* connection, 00031 __time interval, 00032 __uint32 id, 00033 TReceiverList* list 00034 ); 00035 virtual ~CStreamPullReceiver(); 00036 00037 inline CConnectionSender* Connection() { return this->connection; } 00038 00039 void Send(CStreamFrame frame); 00040 00041 void List(TReceiverList* list); 00042 inline TReceiverList* List() { return this->list; } 00043 00044 private: 00045 void Timer(CTimerInfo* info); 00046 };
Last updated: February 8, 2011