forest-net
an overlay networks for large-scale virtual worlds
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
forest::RouterInProc Class Reference
Collaboration diagram for forest::RouterInProc:

Classes

struct  ThreadInfo
 info for worker thread used to process an incoming control packet More...
 

Public Member Functions

 RouterInProc (Router *)
 

Static Public Member Functions

static void start (RouterInProc *)
 Start input processor. More...
 

Private Types

typedef
high_resolution_clock::time_point 
timePoint
 

Private Member Functions

void run ()
 Main input processing loop.
 
bool inBound ()
 Check for an inbound packet and process it. More...
 
bool outBound ()
 Check for an outbound packet and process it. More...
 
bool bootStart ()
 
pktx bootReceive ()
 During boot process, return next waiting packet or 0 if there is none.
 
void bootSend (pktx)
 Send packet to net manager during boot process. More...
 
pktx receive ()
 
void forward (pktx)
 
bool pktCheck (pktx, int)
 Perform error checks on forest packet. More...
 
void handleConnDisc (pktx)
 
void handleRteReply (pktx, int)
 
void sendRteReply (pktx, int)
 
void subUnsub (pktx, int)
 

Private Attributes

uint64_t now
 relative to router start time
 
Routerrtr
 pointer to main router object
 
int maxSockNum
 largest socket num opened by ioProc
 
fd_set * sockets
 file descr set for open sockets
 
int cIf
 number of "current interface"
 
int nRdy
 number of ready sockets
 
QuManagerqm
 queues and link schedulers
 
ThreadInfotpool
 pointer to thread pool
 
List freeThreads
 list of unassigned thread indexs
 
Quu< pair< int, int > > retQ
 Quu coming from worker threads.
 
int64_t rcvSeqNum
 used to coordinate thread dealloc
 
HashSet< comt_t, Hash::u32 > * comtSet
 maps comt->thx
 
Repeaterrptr
 for repeating control packets
 
RepeatHandlerrepH
 for handling received repeats
 
int bootSock
 socket used while booting
 

Static Private Attributes

static const int numThreads = 100
 max number in thread pool
 
static const int maxReplies = 10000
 max # of remembered replies
 

Detailed Description

Definition at line 39 of file RouterInProc.h.

Member Function Documentation

void forest::RouterInProc::bootSend ( pktx  px)
private

Send packet to net manager during boot process.

Parameters
pxis the index of the packet to send.

Definition at line 185 of file RouterInProc.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::RouterInProc::inBound ( )
private

Check for an inbound packet and process it.

Returns
true if a packet was processed, else false

Definition at line 206 of file RouterInProc.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::RouterInProc::outBound ( )
private

Check for an outbound packet and process it.

Returns
true if a packet was processed, else false

Definition at line 333 of file RouterInProc.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::RouterInProc::pktCheck ( pktx  px,
int  ctx 
)
private

Perform error checks on forest packet.

Parameters
pxis a packet index
ctxis the comtree index for p's comtree
Returns
true if all checks pass, else false

Definition at line 461 of file RouterInProc.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::RouterInProc::start ( RouterInProc self)
static

Start input processor.

Start() is a static method used to initiate a separate thread.

Definition at line 40 of file RouterInProc.cpp.


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