forest-net
an overlay networks for large-scale virtual worlds
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
IoProcessor.h
Go to the documentation of this file.
1
9
#ifndef IOPROCESSOR_H
10
#define IOPROCESSOR_H
11
12
#include "
Forest.h
"
13
#include "
IfaceTable.h
"
14
#include "
LinkTable.h
"
15
#include "PacketStore.h"
16
#include "
StatsModule.h
"
17
18
namespace
forest {
19
20
21
class
IoProcessor
{
22
public
:
23
IoProcessor
(
int
, ipp_t,
IfaceTable
*,
LinkTable
*,
24
PacketStore
*,
StatsModule
*);
25
~
IoProcessor
();
26
27
bool
setup
(
int
);
28
bool
ready(
int
);
29
bool
setupBootSock(ipa_t, ipa_t);
30
void
closeBootSock();
31
32
int
receive();
33
void
send(
int
,
int
);
34
35
private
:
36
ipp_t
bootIp
;
37
ipa_t
nmIp
;
38
int
bootSock
;
39
ipp_t
portNum
;
40
41
int
maxIface
;
42
int
maxSockNum
;
43
fd_set *
sockets
;
44
int
cIf
;
45
int
nRdy
;
46
int
*
sock
;
47
48
IfaceTable
*
ift
;
49
LinkTable
*
lt
;
50
PacketStore
*
ps
;
51
StatsModule
*
sm
;
52
};
53
54
inline
bool
IoProcessor::ready(
int
iface) {
return
sock
[iface] > 0; }
55
56
}
// ends namespace
57
58
59
#endif
forest-net
cpp
include
IoProcessor.h
Generated on Mon Aug 4 2014 11:13:35 for forest-net by
1.8.4