HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_NetMessagePipe Class Reference

#include <UT_NetMessage.h>

Classes

class  AutoNetworkTimer
 

Public Member Functions

 UT_NetMessagePipe (const UT_StringHolder &trackeraddr, int trackerport, int peer, int npeer, const UT_StringHolder &jobname)
 
virtual ~UT_NetMessagePipe ()
 
bool openPipes (int timeoutms=100)
 Prepares the pipes, returns true if successful. More...
 
bool closePipes (int timeoutms=100)
 Shuts down the pipes, returns true if successful. More...
 
UT_NetMessagereadPipe (int peer)
 
UT_NetMessagewritePipe (int peer)
 
bool transferData (int timeoutms=100)
 
void setCompressionThreshold (exint threshold_bytes)
 
exint compressionThreshold () const
 

Protected Member Functions

bool pumpData (int timeoutms)
 Returns true until all the messages have been flushed. More...
 
void startNetworkTimer ()
 
void stopNetworkTimer ()
 

Protected Attributes

UT_StringHolder myTrackerAddress
 
UT_StringHolder myJobName
 
int myTrackerPort
 
int myNPeer
 
int myPeer
 
UT_NetSocketmyToSelf
 
UT_NetMessagePump myPump
 
UT_ValArray< UT_NetMessage * > myAnnounce
 
UT_ValArray< UT_NetMessage * > myReadPipes
 
UT_ValArray< UT_NetMessage * > myWritePipes
 
exint myCompressionThreshold
 Number of bytes to start compressing at. More...
 

Friends

class AutoNetworkTimer
 

Detailed Description

Examples:
standalone/msgpipe.C.

Definition at line 561 of file UT_NetMessage.h.

Constructor & Destructor Documentation

UT_NetMessagePipe::UT_NetMessagePipe ( const UT_StringHolder trackeraddr,
int  trackerport,
int  peer,
int  npeer,
const UT_StringHolder jobname 
)
virtual UT_NetMessagePipe::~UT_NetMessagePipe ( )
virtual

Member Function Documentation

bool UT_NetMessagePipe::closePipes ( int  timeoutms = 100)

Shuts down the pipes, returns true if successful.

exint UT_NetMessagePipe::compressionThreshold ( ) const
inline

Definition at line 595 of file UT_NetMessage.h.

bool UT_NetMessagePipe::openPipes ( int  timeoutms = 100)

Prepares the pipes, returns true if successful.

bool UT_NetMessagePipe::pumpData ( int  timeoutms)
protected

Returns true until all the messages have been flushed.

UT_NetMessage* UT_NetMessagePipe::readPipe ( int  peer)
inline

Run resetLength on the read pipes to setup the desired amount to read. Likewise, resetLength the write pipes & fill in the data to write.

Definition at line 586 of file UT_NetMessage.h.

void UT_NetMessagePipe::setCompressionThreshold ( exint  threshold_bytes)
inline

Definition at line 594 of file UT_NetMessage.h.

void UT_NetMessagePipe::startNetworkTimer ( )
protected
void UT_NetMessagePipe::stopNetworkTimer ( )
protected
bool UT_NetMessagePipe::transferData ( int  timeoutms = 100)

Flushes all write pipes, fills all read pipes. Afterwards the readPipes will have their data filled in. Returns true if not errored or aborted.

UT_NetMessage* UT_NetMessagePipe::writePipe ( int  peer)
inline

Definition at line 587 of file UT_NetMessage.h.

Friends And Related Function Documentation

friend class AutoNetworkTimer
friend

Definition at line 617 of file UT_NetMessage.h.

Member Data Documentation

UT_ValArray<UT_NetMessage *> UT_NetMessagePipe::myAnnounce
protected

Definition at line 610 of file UT_NetMessage.h.

exint UT_NetMessagePipe::myCompressionThreshold
protected

Number of bytes to start compressing at.

Definition at line 615 of file UT_NetMessage.h.

UT_StringHolder UT_NetMessagePipe::myJobName
protected

Definition at line 605 of file UT_NetMessage.h.

int UT_NetMessagePipe::myNPeer
protected

Definition at line 607 of file UT_NetMessage.h.

int UT_NetMessagePipe::myPeer
protected

Definition at line 607 of file UT_NetMessage.h.

UT_NetMessagePump UT_NetMessagePipe::myPump
protected

Definition at line 609 of file UT_NetMessage.h.

UT_ValArray<UT_NetMessage *> UT_NetMessagePipe::myReadPipes
protected

Definition at line 611 of file UT_NetMessage.h.

UT_NetSocket* UT_NetMessagePipe::myToSelf
protected

Definition at line 608 of file UT_NetMessage.h.

UT_StringHolder UT_NetMessagePipe::myTrackerAddress
protected

Definition at line 604 of file UT_NetMessage.h.

int UT_NetMessagePipe::myTrackerPort
protected

Definition at line 606 of file UT_NetMessage.h.

UT_ValArray<UT_NetMessage *> UT_NetMessagePipe::myWritePipes
protected

Definition at line 612 of file UT_NetMessage.h.


The documentation for this class was generated from the following file: