Proud::CDumpClient Class Referenceabstract

Public Types

enum  State { Connecting, Sending, Closing, Stopped }
 

Public Member Functions

virtual void Start (String serverAddr, uint16_t serverPort, String filePath)=0
 
virtual void FrameMove ()=0
 
virtual State GetState ()=0
 
virtual int GetSendProgress ()=0
 
virtual int GetSendTotal ()=0
 

Static Public Member Functions

static CDumpClientCreate (IDumpClientDelegate *dg)
 

Detailed Description

Dump client

  • Manages sending DMP files to server after connected to CDumpServer
  • Inefficeint compared to HTTP and this kind of custom protocol is more realistic since most of web hosting services turn off file record permission pushing publishers to setup own servers.

General usage

  • Use Create() to create.
  • After creating the object the use Start() to send.
  • Calls FrameMove periodically (approx. 10 or more times per second)
  • The sending status during sending process can be acquired by using GetState(), GetSendProgress() and GetSendTotal(). And those can be displayed in chat box.
  • ait until OnException and OnComplete arrive.

Member Function Documentation

static CDumpClient* Proud::CDumpClient::Create ( IDumpClientDelegate dg)
static

TODO:translate needed. Generate CDumpClient object

Parameters
dgPointer of IDumpClientDelegate
virtual void Proud::CDumpClient::FrameMove ( )
pure virtual

Sending process is sustained by calling this method periodically.

virtual int Proud::CDumpClient::GetSendProgress ( )
pure virtual

Gets how many bytes of dump file has been completed

virtual int Proud::CDumpClient::GetSendTotal ( )
pure virtual

Gets total sending data to be sent

virtual State Proud::CDumpClient::GetState ( )
pure virtual

Gets current dump file sending status

virtual void Proud::CDumpClient::Start ( String  serverAddr,
uint16_t  serverPort,
String  filePath 
)
pure virtual

TODO:translate needed. Start sending dump file to dump server.

Parameters
serverAddr
serverPort
filePath