Alex Bikfalvi
SimStream Documentation
HostServerPull.h
00001 #pragma once 00002 00003 #include "HostServer.h" 00004 #include "InfoPull.h" 00005 #include "StreamServerPushMcast.h" 00006 #include "StreamServerPull.h" 00007 00008 class CHostServerPull : public CHostServer 00009 { 00010 protected: 00011 CInfoPull* info; 00012 00013 // Stream servers 00014 CStreamServerPushMcast** streamServersMcast; 00015 CStreamServerPull* streamServerUcast; 00016 00017 // Delegates 00018 Delegate4<CHostServerPull, void, __uint32, CPacketIp*, CPacketUdp*, CPacket*>* 00019 delegateRecv; 00020 00021 Delegate0<CHostServerPull, CLink*>* 00022 delegateLink; 00023 00024 Delegate2<CHostServerPull, void, CAddress, CPacketStream*>* 00025 delegateSendStream; 00026 Delegate2<CHostServerPull, void, CAddress, CStreamMessage*>* 00027 delegateSendMessage; 00028 00029 public: 00030 CHostServerPull( 00031 __uint32 id, 00032 CSimHandler* sim, 00033 CAddress address, 00034 CInfoPull* info, 00035 CData* data 00036 ); 00037 virtual ~CHostServerPull(); 00038 00039 virtual void Start(); 00040 virtual void Stop(); 00041 00042 virtual void Finalize(); 00043 00044 private: 00045 void Recv(__uint32, CPacketIp* ip, CPacketUdp* udp, CPacket* packet); 00046 00047 void SendStream(CAddress dst, CPacketStream* packet); 00048 void SendMessage(CAddress dst, CStreamMessage* message); 00049 00050 inline CLink* Link() { return CNode::Link(0); } 00051 };
Last updated: February 8, 2011